World of Spectrum
  • Categories
  • Discussions
  • FAQ
  • Sign In
Home › Search
Title Search
@title beer Word 'beer' in title
User Search
  • @user admin Only posts by Admin
Text Search
  • @body beer Word 'beer' in the text
Phrase Search
"Hello World" Exact phrase match
Exclude Terms
  • car -red Search cars that are not red
"Or" Searches
  • honda | bmw 'honda' or 'bmw' results
Multi-Field
@(title,body) hello Both contain 'hello'
WildCard
  • hond* civ* Match all with an astrix
Combination
  • @title bmw @user admin
See more supported syntax examples
Search Again :: Adv Search 1000 results in 0.013s
<1234567…34>
  • Converting an integer arbitrary large binary number into a printable decimal formThis was asked a long ago at the comp.sys.sinclair newsgroup. At that time, I came up with a solution by extrapolating the classic algorithm of suces…

    ... /> Add4Block proc
    ld hl,BCD
    BucAdd ld a,(hl)
    cp 50h ... leading zeros
    ld hl,BCD
    BucPrint2Dig ld a,(hl)
    srl a ...
    mcleod_ideafix mcleod_ideafix November 2013 Development
  • About how z88dk generates code and makes room for variables.When you attempt to code games for the 128K models using z88dk in C you need to somewhat control where variables are stored in memory. I thought tha…

    ... />
    [code]ld A, $06
    ld ($5EF1), A
    ld A, $07 ...
    ld ($5EF2), A
    ld HL, $0008
    ld ($C729), HL
    ld HL ... , $0009
    ld ($C77D), HL ...
    na_th_an na_th_an January 2014 Development
  • Ghosts n' Goblins loaderI'm trying to put Ghosts n' Goblins onto a +3 disk but struggling to understand the mc loader. Basic loader [code] ink 7 : clear 25000 : load "" cod…

    ... : LD SP, HL
    65253: POP HL
    65254: LD SP, HL
    65255: LD HL, 60016 ...
    65258: PUSH HL
    65259: PUSH HL ...
    Speccy_James Speccy_James February 2014 Development
  • Scrolling Bi-Colour Engine for 4-Player GamesJust putting this code up for people to have a look at. Far from finished. Should simply compile and run a bit of a demo. Only good for 128K and +…

    ...
    ld hl,48640
    ld de,48641
    ld (hl),191
    ld bc,256 ... /> ld hl,char_address
    add hl,bc ;hl = row in table
    ld e,(hl)
    inc hl
    ld d,(hl ...
    joefish joefish March 2014 Development
  • Does this addressing technique have a name?Hi All, Bit of a weird/unnecessary question, but can anyone help build on my knowledge of asm terminology by telling me what the *second* method of …

    ... ,21
    LD (PlyrY), A
    LD A,15
    LD (PlyrX), A ... Method:

    LD HL, 3861
    LD (PlyrY), HL

    DEFB:
    Jagd Tiger Jagd Tiger March 2014 Development
  • understanding machine codeHi Quick question. Am not really sure if it fits development forum as its not really development per se its more a learners question about developm…

    ... POP HL
    7E LD A,(HL)
    23 INC HL
    E5 PUSH HL
    323C5C LD (TVFLAG),A
    ... using Zero emulator)
    323c5c LD (TVFLAG), A

    LD (TVFLAG), A
    < ...
    username username April 2014 Sinclair Miscellaneous
  • SBC or ADDIs this dangerous/bad practice thing to do..... I want to subtract 64 from a number, but to save a few bytes can I just add (65536-64) 65472 to the…

    ... LD HL,32768
    LD BC,65472
    ADD HL,BC
    LD (test),HL


    LD HL,32768
    LD BC,64
    SBC ... HL,BC
    CCF ; ... sometimes it need this....
    LD (test),HL
    RET

    MatGubbins MatGubbins April 2014 Development
  • Currah ?Speech channelIt seems to me that it would be nice to be able to send words to the ?Speech with PRINT #5;"Speak English to me, Jimmy" or some such. There really i…

    ... /> new_word:
    ld hl, 65362 ; if zero
    ld (hl), $51 ; make it ... add hl, de ; allophone
    ld a, (hl) ; get allophone
    ld hl, ( ... 65362) ; address buffer
    ld (hl), ...
    chev chev June 2014 Development
  • Hooky - hook ZX ROM and rewire RST and NMI to RAM - rantThis is a rather long rant. Not for short tempered. :) The objective is to hook into RST "vectors" and NMI on a Spectrum without affecting the normal…

    ... /> 0x11DC LD (HL),#0x02 ; mem. 0xffff is 2
    0x11DE DEC HL ; HL=HL-1 ... 5cb2
    0x1222 LD HL,(5CB2) ; FF57
    0x1225 LD (HL),#0x3e ; write 3e ...
    0x1227 DEC HL ; hl=ff56
    0x1228 LD SP,HL ; setting sys. stack ...
    tstih tstih July 2014 Development
  • Help with Manic Miner tweaksPlease. :) This is the Software Projects version, simply as I had it to hand. [B]Problem 1:[/B] I've learned a bit (actually quite a bit) and manag…

    ... 37107 24 202
    L_90F5: LD (HL), 48 ; 37109 54 48
    DEC HL ; 37111 43
    LD A, L ; 37112 ... 50 87 132
    L_9109: LD A, (HL) ; 37129 126
    ... :

    [code]L_8FD0: LD HL, (L32944) ; 36816 42 176 128 ...
    spider spider July 2014 Games
  • Problem Reading the KeyboardHi Folks, I'm working my way through Toni Baker's rather good book and thought I'd write some code to scan the keyboard and store the results so tha…

    ... copy
    LD DE,_oldKeyStates ;Destination
    LD HL,_currentKeyStates ;Source< ... the keyboard segments
    LD HL,_currentKeyStates ;Where to store ... keyboard segment number
    LD HL,_keyboardSegments ;Calculate the keyboard ...
    KrazyKattapilla KrazyKattapilla July 2014 Development
  • Better arrangement for video memory?While doing some documentation work for the ZX-Uno project, I compared the advantages of the weird layout of the ZX Spectrum against a linear layout.…

    ... ,8
    BucScan:
    ld a,(hl)
    ld (de),a
    inc ... .
    ;OUTPUT: HL=address of byte containing pixel
    LD B,A ... ,8
    BucScan:
    ld a,(hl)
    ld (de),a
    inc ...
    mcleod_ideafix mcleod_ideafix September 2014 Development
  • Help needed with a bit of code...My minds gone blank again I'm afraid, I'm having trouble with this routine that loads variables into memory then calls the corresponding routine. Th…

    ... ld b,3
    ld hl, cor
    ld de,adds
    loop
    ld ... a,(de)
    ld ... inc de
    ld a,(de)
    ld (caller+2),a; loads ... inc de

    ;ld a,(hl) ;hl stores variables
    ;now i ...
    daveysludge daveysludge October 2014 Development
  • Double height text...<p>Is here any good routines for printing a font double height?</p><p>I've concocted this ridiculous routine but I'm sure it can be done much better.…

    ... (hl)
     
     ld hl,x12+1
     inc (hl) ld hl,x13+1
     inc (hl) ld hl ... ,x14+1
     inc (hl) ld hl,x15 ... +1
     inc (hl); ld hl,x16 ...
    daveysludge daveysludge June 2015 Development
  • Drawing some spritesI figured I want to draw some sprites. My target was to do a 16x16 masked sprite. There's no clearing here, just drawing the sprites. My first ite…

    ...
    and (hl)
    inc hl
    or (hl)
    ld (de),a
    and (hl)
    inc hl
    or (hl)
    ld (de),a
    Sol_HSA Sol_HSA November 2015 Development
  • Mr. Jido makes some noiseA little something to analyse and discuss for you. [code] ORG 60000 ; RND Generator: RND LD HL,EARTH LD A,(WIND) ADD A,L LD …

    ... ,(HL)
    LD (FIRE),A
    LD HL,WIND
    INC (HL)
    LD E,(HL)
    LD HL ... ,EARTH
    ADD HL,DE
    LD A,(HL)
    LD ...
    Andy Schraepel Andy Schraepel December 2015 Development
  • Text scroller and custom fontYesterday I was testing this text scroll routine taken from Jonathan Cauldwell's Intro Maker (labels have been inserted to allow partial code relocab…

    ...
    LD HL, FONT
    LD (23606),HL
    LD DE,L_35413
    LD BC,00001 ... L_35420
    LD HL,(L_35489)
    LD A,(HL)
    POP HL
    ... LD HL,PUNTO_A
    RRC (HL)
    RET NC
    LD HL,(L_35489)
    INC HL ...
    Alessandro Grussu Alessandro Grussu January 2016 Development
  • Simple bit of machine code not working [SOLVED]ishHi all. It's late and I'm tired and I have no idea why the following piece of code wont display a little smiley face [code]ld hl,udg ld (236…

    ... />

    [code]ld hl,udg
    ld (23675),hl
    ld a,2
    call 5633
    ld a ...
    Tobo Tobo March 2016 Development
  • Let's copy buffers!Figured I'd do some double buffered graphics, so I can render for several frames before displaying stuff. Yes, I mean on a 48k speccy, so no 128k spe…

    ... pop de
    pop hl
    ld sp, #(constant value of scanline ... #12
    add hl, bc
    ld sp, hl
    pop af < ... pop de
    pop hl
    ld sp, #(constant value of scanline ...
    Sol_HSA Sol_HSA April 2016 Development
  • Faster Manic MinerHey, dudes. I've been fiddling around trying to wring more speed out of this game recently. I've replaced the LDIR buffer copying routines with s…

    ... buffer and an unrolled POP HL, LD (nn),HL section for the 512 ... stick another enormous unrolled POP HL, LD (nn),HL section. That should give ...
    Mysterion Mysterion May 2016 Development
  • ZX Spin and a question or two......Not really used Spin before since Spectaculator covers everything I need - except now I have need of an easy to use assembler. Downloaded several, n…

    ... />
    [code]
    LOOP LD A,(HL)
    CP 0
    JR ...
    RST #10
    INC HL
    JR LOOP
    [/code ...
    DEATH DEATH November 2016 Emulators
  • Code optimisation! 16bit number to 5 digit stringJust for interest this one, any thoughts on how to make this as fast as possible? Little optimisations to this routine or a complete reimagining? …

    ... number2string: ;arrive DE number, HL at end of string,assume ... lp: inc (hl) ;increase string number
    ld a,(hl)
    ... jp c,cont
    ld (hl),'0' ;yep,reset and ...
    cont: ld l,c ;HL back to start of ... number counter
    ld a,d
    or ...
    R-Tape R-Tape December 2016 Development
  • Random Numbers, USR Return Values & Timing BASICI've been trying out Jon Ritman's random number routine, published in Your Sinclair Aug'87. Apart from a timing comparison I also did a frequency ana…

    ... number. This version returns with HL holding a 16-bit random ... ,$38 ;restack,end_calc
    LD A,(HL) ;Fetch the exponent of ... . divide 'last value'
    LD (HL),A ;by 65536 to give ... last value'.
    RANDOM0:POP HL ;discard $2d2b ;STACK_BC return ...
    Battle Bunny Battle Bunny January 2017 Sinclair Basic
  • Scrolling loader counter in 85 T-States?Would it be possible to write a scrolling loader counter in 85 T-States? I have a custom screen load routine that loads attribute first, then the …

    ... ld hl,22528 ; attributes
    ld de,49152 ; destination
    loop2: ld (saveaa+1),hl ... ; save attribute address
    ld a,(hl) ; get attribute
    ld ... hl
    loop1: ld a,(hl) ; get pixel
    ld ... /> saveaa: ld hl,0 ; retrieve ...
    FrankT FrankT February 2017 Assembler
  • A sped up pixel-shift routine for 1-byte–wide spritesHere’s an optimized (for speed) real-time sprite shifting routine for sprites that are one byte wide. It uses no memory variables for storage of inte…

    ... two sprites, hence the [b]ld hl,(sprite_8x8[/b]) instruction.)
    ... DE

    ld hl,(sprite_8x8) ;point HL to sprite data
    ld (hl),a ;place it on screen ... right
    ld a,(hl)
    xor b
    ld (hl),a ;place ...
    Ast_A_Moore Ast_A_Moore February 2017 Development
  • Copying a single character from one place to another?[code] ORG 33000 LD A,8 LD HL,16384 LD BC,256 LD DE, 18432 LOOP: PUSH AF LD A,(HL) LD (DE),A ADD HL, BC POP AF DEC A JR NZ,LOOP REST […

    ...
    LD A,8
    LD HL,16384
    LD BC,256
    LD DE ... :
    PUSH AF
    LD A,(HL)
    LD (DE),A
    ADD ... HL, BC
    POP AF
    ivanb303 ivanb303 March 2017 Assembler
  • ZXSCLZF - Yet another Screen CompressorQuick disclaimer before I continue, this compressor does not shrink screens as small as some of the others posted here, in particular the very good z…

    ... ;; ==============================================
    org $c000
    ld hl,screen ; 10t - start location of ...
    ld e,(hl) ; 7t
    inc hl ; 6t
    ld d,(hl) ; 7t - ... br /> _ulzfa040:
    ld a,(hl) ; 7t
    ld (de),a ; 7t ...
    TomD TomD April 2017 Development
  • High score table routineI wrote this general purpose high score table routine. It stores 5 scores and displays them alongside the player names, which are 8 characters long. …

    ... /> LD HL,(SCORE)
    LD (FOURTH),HL

    LD HL,POS_4+3
    LD (TEMP),HL
    LD HL,(SCORE)
    LD (SECOND),HL

    LD HL,POS_2+3
    LD (TEMP),HL
    Alessandro Grussu Alessandro Grussu July 2017 Assembler
<1234567…34>

Latest Posts

  • Your Favorite Magazine Cover Tapes.
    Your Spec-chum on 2:19PM
  • Where to Buy the New or Fairly Recent , Excellent ZX Spectrum Games Software?
    Your Spec-chum on 1:34PM
  • i am currently listening to........
    mel the bell on 11:34AM
  • Mis-labeled cassette titles or a name change?
    harriusherbartio on 11:06AM
  • Ways to preserve Speccy Tapes in the loft
    harriusherbartio on 10:58AM
  • Fixed Speccy Software. And which games remained unfixed?
    harriusherbartio on 10:47AM
  • Minor British Sports that did become games on the ZX Spectrum
    harriusherbartio on 10:30AM
  • How to return to basic properly from ASM
    Paradigm Shifter on 1:54AM
  • Frankie's ZX Spectrum Digouts
    Zup on April 8
  • Elusive Strategy Games done by the Smaller or less Prolific Software Houses.
    harriusherbartio on April 8

HitBox

Word Docs Hits
ld 6.3K 67.3K
23641 33 47
hl 6.2K 48K

Related Threads

  • DEC BC/LD A,B/OR C/JP NZ,loopyesterday i saw nice trick:[code]<br /> <br /> dec bc<br /> ld a, b<br /> or c<br /> jp nz, loop<br /> <br /> can be replaced (bc starts &gt;255, sho…
  • When would you use LD A,R ?Can anyone tell me a practical use of LD A,R and LD R,A I am confused when you would need to use it?<br /> <br /> Cheers
  • Correct flag response to BIT n,(HL) etc.When running the test program suggested by Arjun (thanks again), all intructions are passing the flag tests except the BIT n,(HL), BIT n,(IX+dis) and…
  • Contention: LDI vs LD (ss), rAccording c.s.s. FAQ:<br /> <br /> instruction LD (ss),r breakdowns as pc:4,[b]ss:3[/b]<br /> and LDI as pc:4,pc+1:4,hl:3,[b]de:3,de:1 x 2[/b]<br /> …
  • rotating HL left through CarryI've tried this several ways, and it works for a while, then a particular value has a bit set in an inconvenient place and it all goes to pot.<br /> …
  • Restore HL' to?It is probably a simple question, but it's been escaping me for quite some time now.<br /> <br /> Is there an 'universal' value you should restore HL…
  • Getting PC into HLHello, here's a conundrum for you...<br /> <br /> Is there a way to obtain the value of the PC register (say into HL) without using absolute addressi…
  • Z80: ABS(HL) functionI must be very tired but I cannot get my head around whether this function provides a correct implementation of a ABS function for a signed 16-bit va…
  • JP (HL) confusionokay.... JP nn will jump to memory address nn.<br /> JP (HL) ,I assumed would read the contents of memory address HL and jump to the location<br /> …

Related Searches

  • ld ix
  • ld bytes
  • ld hl de
  • return to basic hl
  • ld bc eostr string
  • ld am
  • ld a r
  • ld r a
  • call hl
  • ld a b xor c loop
  • ld a b or c loop
  • ld i a
  • ld a 3fh
  • ld a 0 call 5633
  • ld fe 00
  • slt format hl
  • ld bc hl
  • ld hl 5678
  • 33 ld hl xxxx
  • screen buffer pop bc ld sp hl

Copyright © 2024 World of Spectrum