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.008s
<1234567…34>
  • Screen2StringFurther to writing that BASIC one-liner to redirect CAT to a string I thought that I'd do a general redirection routine for anything which normally p…

    ... code
    REM ld hl,(ptr) : ld (hl),a : inc hl : ld (ptr),hl : ret
    DATA ...
    Battle Bunny Battle Bunny May 2012 Sinclair Basic
  • What's wrong with this code ?OK, working my way through Jonathan Cauldwells 'How To' tome and I can't get the following to run in either spin or basin. ( iused the assembler in b…

    ... graphics.

    ld hl,blocks ; address of user ... ld hl,21+15*256 ; load hl pair with starting coords.
    ld (plx),hl ... br />
    mpl ld hl,ply ; remember, y ... br />
    mpr ld hl,ply ; remember, y ...
    Saboteur Saboteur May 2012 Development
  • Moving a line down the display in assembler?...It's not a "[I]how can I do it[/I]" question, it's more a "am I missing something in trying to do it a new way" kinda question. What I've been doing…

    ... /> [CODE]
    ld hl,16384
    ld b,8
    loop1: ld (hl),255
    hl)
    inc h
    ld h,(hl)
    ld l,a

    ld (hl ...
    Sokurah Sokurah June 2012 Development
  • CMWC random number generator for Z80Seeing the interest regarding the [URL="http://www.worldofspectrum.org/forums/showthread.php?t=23070"]Xor-Shift random number generator for Z80[/URL]…

    ... /> ld b,0
    ld c,e
    ld hl,table
    add hl,bc ...

    ld c,(hl ... = ~x

    pop hl

    ld (hl),a ; q[i] = x ...
    Patrik Rak Patrik Rak June 2012 Development
  • Jelly-Vision!As threatened in the "'Spectrum Play' Error" thread, here's a ruff'n'reddy interrupt driven full screen wobbling routine which has no practical use w…

    ... : push hl
    ld hl,0005
    add hl,sp
    ld a,(hl)
    cp ... ,MOVEUP
    MOVEDOWN: ld hl,16384+256
    ld de,16384
    ldir ...
    Battle Bunny Battle Bunny June 2012 Sinclair Basic
  • 40 Column Printing RoutineI've written a 40 column printing routine, which I'd like to share... It's my first piece of 'public' code so go easy on me! I don't think it is a…

    ... /> ld hl,overscratch
    overpopulate ld (hl),%00000011
    inc hl
    ld (hl),255
    inc hl ...
    uglifruit uglifruit August 2012 Development
  • merging bytesPicturing three bytes with their bits identified by letters to make the visualisation easier, what's the best way to perform this transformation? [co…

    ...
    ld (hl),a
    inc hl
    [color=red] ld a,(hl) ;ld a,b ... /> or d ;A=FGHlmnop
    ld (hl),a
    ret
    [/code ...
    Battle Bunny Battle Bunny August 2012 Development
  • Any ideas on speeding up this assembler segment?It copies a pixel column of a rectangle which may be anywhere in the display file to a pixel column in d$. The source column may start at any bit pos…

    ... position 1->8
    ld a,(hl) ; 7
    rotbit0: ... br /> ex de,hl ; 4
    or (hl) ; 7
    ld (hl),a ; 7 ... set selected bit in d$()
    ex de,hl ...
    Battle Bunny Battle Bunny September 2012 Development
  • BeepFX ProblemHi All, I'm currently trying to integrate the BeepFX engine in my 100% Assembler Game and it plays the sound fine, but then plays the sound again, a…

    ... /> add hl,bc
    ld a,(hl)
    inc hl
    ld h,(hl)
    ld l ... ,a
    push hl ...
    Shando Shando September 2012 Development
  • multi-scroll m/c subroutine for BASICArising from recent posts, here's a scrolling routine that will manage multiple left/right scrollings for any (sensible) line width or step; (ie. whe…

    Arising from recent posts, here's a scrolling routine that will manage multiple left/right scrollings for any (sensible) line width or step; (ie. where width is
    Battle Bunny Battle Bunny October 2012 Sinclair Basic
  • Fantasy Z80 instructions?This follows on from something catmeows said in another thread, and that I've been meaning to ask for a while. This may sound daft to people with mo…

    ... /> [I]Eg

    ld z,(hl) ;if condition met load accumulator ... with (hl)

    or

    R-Tape R-Tape November 2012 Development
  • Graph Plothi! please, help with code: [PHP]For x=-100 To 100 For y=-100 To 100 If (x/2-25)*(x/2-25)+(y-50)*(y-50)<200 Or (x/2+25)*(x/2+25)+(y-50)*(y-50)<200 th…

    hi! please, help with code:
    [PHP]For x=-100 To 100
    For y=-100 To 100
    If (x/2-25)*(x/2-25)+(y-50)*(y-50)
    g0blinish g0blinish November 2012 Development
  • Optimisations in Exomizer Z80 decrunch codeThis is the 163 bytes old code (simple and optimized): [CODE] ld iy, exo_mapbasebits ld a, 128 ld b, 52 push de exo…

    ... [i]=b1
    push hl
    ld hl, 1
    defb 210 ... hl
    ld h, d
    ld l, e
    sbc hl, bc ;hl ... hl
    ld d, h
    ld e, l
    sbc hl, bc ;hl= ...
    antoniovillena antoniovillena November 2012 Development
  • Omitting LETAn untested thought. Changing: [code]1B34 SUB $CE ; Reduce command code by $CE to ; give 00 to 31 for comman…

    ... ,TRYLET

    ...
    TRYLET LD HL,(CHADD) ; Step CHADD back to ... statment
    DEC HL
    LD (CHADD),HL
    LD A,'LET'-$CE ; Set ...
    Jonathan Harston Jonathan Harston November 2012 Sinclair Basic
  • Machine code RST10 problemHello! After 27 years of playing with Spectrums I'm starting to look into doing assembly language properly. All went swimmingly well until I wrote …

    ... de,hl ; remember HL as it points to the message
    ld hl, ... control codes
    .msgpcc ld a,(hl) ; load character into A ... ; print it
    inc hl ; point to next control character ... ex de,hl ; recall hl pointing to message
    .msgpch ld a,(hl) ; load ...
    snigfarp snigfarp November 2012 Development
  • How do you restrict this routines actions?I'm trying to plagiarise a piece of code I came across in the 80's, but seem to be banging my head against a brick wall! The routine fades the scree…

    ...
    l_b798: ld hl, 22528+32
    l_b79b: ld a, (hl)
    ld b, a ... , b
    l_b7ca: ld (hl), a
    inc hl
    ld a, h
    ret

    fader: ld b, 16
    l_b7d5: push ...
    jr l_b798
    l_b7d8: ld bc, 511
    l_b7db: dec ...
    daveysludge daveysludge February 2013 Development
  • Printing textThis is probably quite a basic question, or there might be something obvious I'm missing. I'm looking for an economical way of printing formatted te…

    ...

    ld hl,text_to_print

    print_text
    ld a,(hl)
    or ...
    rst 16
    inc hl
    jr print_text

    Morkin Morkin April 2013 Development
  • Idk>le me browsing through some game's code >..... [code]61A8 F5 push af 61A9 3EFF ld a,FF 61AB D37F out (7F),a 61AD D33F ou…

    ...
    61BF 22F862 ld (62F8),hl
    61C2 ED73FC62 ld (62FC),sp
    61C6 E1 pop hl
    61C7 22FA62 ld (62FA),hl
    61CA 31F862 ... 22BE62 ld (62BE),hl
    620F 2100CD ld hl,CD00
    6212 22BC62 ld (62BC),hl ...
    Hikaru Hikaru June 2013 Development
  • Struggling with this routine... Any ideas?I'm trying to write a routine that plots 3 pixels to decrease the energy bar in the top right corner by 5 units, but it just wont have it! There mus…

    ... /> [CODE]org 30000
    ld b,5 ;decrease energy by ... push bc
    loop1 ld hl,51993 ;address energy level is ... stored
    dec (hl) ;decrease energy level(5 ... br /> ld (23695),a ;set colour
    ld a,(hl) ; ... load a with energy level
    ld b ...
    daveysludge daveysludge July 2013 Development
  • Rotronics Wafadrive v.1.80 ROM - Corrupt or purposely broken?I've been digging around the Wafadrive v1.80 ROM (from [URL="http://zxspectrum.it.omegahg.com/_RO.htm"]here[/URL]) and can't decide if the ROM is cor…

    ... /> ld hl, $009f
    ex (sp), hl
    push hl
    ld e, a
    ld ... d, $00
    ld hl, $0cf7 ... /> add hl, de
    ld e, (hl)
    inc hl
    ld h, (hl)
    ld l ...
    jp jp July 2013 Hardware
  • 30-column 8x2 multicolor (even in 48K)I don't recall any 8x2 multicolor routine for 30 columns that would work on all Spectrum models (including the Spectrum 48K), so I decided to write i…

    ... LD HL,nn
    LD DE,nn
    LD BC,nn
    EXX
    LD HL ... PUSH HL ; columns 21 and 22
    LD HL,nn
    LD (nn),HL ; ... columns 29 and 30
    ADD HL,HL ...
    Einar Saukas Einar Saukas August 2013 Development
  • Movin And A Groovin Horizontal Flip improvementOn the left is the flip horizontal portion from Andy Pennell'S excellent Movin' & a Groovin' machine code screen routines from Your Spectrum #19 (Oct…

    ... /> LD B,24 LD B,24
    FLATTR LD A,(HL) flattr LD A,(HL)
    flattr LD A,(HL)
    LD C,(IX+0)
    LD (HL),C
    LD (IX ...
    MatGubbins MatGubbins August 2013 Development
  • Routine for Currah speechI'm currently writing a routine for the Currah that will provide speech during a game. A timer is set to initiate the speech every 50 cycles of the …

    ... />
    Start: ld hl, Dat1
    ld de, 65361
    ld b, 15 ;load ... with 4
    Loop: ld a, (hl)
    ld (de), a ;load allophone ... last byte in buffer
    ld (65364), hl ;update pointer
    ret ...
    daveysludge daveysludge August 2013 Development
  • MC LPRINT 23681Having problems with this routine to print large on the screen using LPRINT, it works ok in BASIC, but cant seem to get it to loop for some reason in…

    ... call cols ;fill attributes
    ld hl,72 ;start of address to ... br /> loop ld (23681),hl ;poke address with hl
    push hl
    ... cols ld hl,22816 ;random colours
    ld b,159
    lp2 ld a ... inc a
    ld (hl),a
    inc hl
    djnz lp2
    daveysludge daveysludge September 2013 Development
  • 128 BASIC-compatible way of loading BASIC as code?On a 48K Speccy (or from 48 BASIC or USR 0 mode on a 128K machine), one can do a silly trick like this: [code];; load a 4000 byte BASIC program ld i…

    ... byte BASIC program
    ld ix,23552 ; start address ... of system variables
    ld de,4000
    call ... line 100
    ld hl,100
    ld (23618),hl
    ld a,1 ; ... statement 1
    ld (23620), ...
    stephenw32768 stephenw32768 September 2013 Development
  • SCREEN$ bug fixI've been using the SCREEN$() function recently for reading data off the screen rather than taking up space with an array and I got fed up with the s…

    ... discard
    ld hl,(23606) ;HL=(CHARS)
    ld (23680),hl
    ld hl,(23675) ;HL=(UDG)
    dec h
    ld ...
    Battle Bunny Battle Bunny October 2013 Sinclair Basic
  • LZ4 decoderI encountered the [URL="http://code.google.com/p/lz4/"]LZ4 compressor[/URL] a few weeks ago. Reading the [URL="http://fastcompression.blogspot.co.uk…

    ... =0
    .mainloop:
    ld a,(hl) ; place token into accumulator
    ld e,(hl) ; read the low byte of ... (4T)
    .getlength_nocarry:
    ld a,(hl) ; re-read the byte (7T ...
    stephenw32768 stephenw32768 October 2013 Development
  • Copy 4Kb in Assembly?Here's an interesting problem: what's the best way to copy a block of 4Kb in assembly? The most obvious solution is to use [B]LDIR[/B]: [CODE] l…

    ... [CODE]
    ld hl,counter_addr
    ld (hl),204
    ld sp,SOURCE+4096 ... ld hl,SOURCE-TARGET-16
    add hl,sp
    ld sp,hl
    ld hl, ... counter_addr
    dec (hl)
    Einar Saukas Einar Saukas October 2013 Development
  • Nasty 'Gotcha' for multicolour timingI thought I would be better developing my multicolour routine on the 48K first, being the slowest, so it would then be sure to work on the 128K varia…

    ... the +2A. I've used LD (nn),HL , then I've used ... prefix byte longer than using HL. There's even a ... duplicate of the command using HL, again with the prefix ... I can do LD (nn),IX followed by LD (nn),HL since the ... . POP IX and POP Hl to refill those registers with ...
    joefish joefish October 2013 Development
  • Troublesome routine, help needed!Having problems with this routine, it basically fires a rocket up the screen, but refuses to detect collisions. I'm using attribute blocks for detect…

    ... /> LD L, A
    ADD HL, HL
    ADD HL, HL
    ADD HL, HL
    ADD HL, HL ...
    ADD HL, HL
    LD DE ...
    daveysludge daveysludge November 2013 Development
<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