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.009s
<1234567…34>
  • Experimenting with turboloadersHello, My first post, having lurked here for a while. I'm a lifelong computer nerd, Spectrum fan since childhood in the eighties, and have recently…

    ... :
    [CODE]LD HL,$1234
    LD HL,$5678
    LD HL,$8765
    LD HL,$4321[/CODE]
    GoingDigital GoingDigital September 2013 Development
  • Experimenting with turboloadersHello, My first post, having lurked here for a while. I'm a lifelong computer nerd, Spectrum fan since childhood in the eighties, and have recently…

    ... :
    [CODE]LD HL,$1234
    LD HL,$5678
    LD HL,$8765
    LD HL,$4321[/CODE]then ...
    Marko Marko September 2013 Development
  • JP (HL) confusionokay.... JP nn will jump to memory address nn. JP (HL) ,I assumed would read the contents of memory address HL and jump to the location and be a gre…

    ... other words
    [code]
    LD A,bytetocheck ; Has to be ... 2
    LD L,A
    LD HL,jumptable
    JP (HL) ; read/peek ... the contents of HL and ... jumps to the memory location HL


    Looking ...
    MatGubbins MatGubbins March 2014 Development
  • Sort 2 byte words (x, y) on ypos, also question about swap (DE), (HL)Well that was a lot of debugging ;) But if you want a routine which takes an array of 16 byte words x, y and then sort them on y (ignoring x), I'm…

    ... ; 4
    ld a, (de) ; 7
    ld (hl), a ; 7
    ex af, af' ; 4
    ld ... ; 4
    ld a, (de) ; 7
    ld (hl), a ; 7
    ex af, af' ; 4
    ld ... pop af
    pop hl
    ld c, a
    jr ...
    Paradigm Shifter Paradigm Shifter July 2022 Development
  • Breakpoints and other questionsSome games have LDIRs, LDDRs, ANDs and XORs before they jump to the real start address (and some other stuff that I don't understand yet). If I want …

    ... them:

    ld af,$1234
    ld bc,$5678
    etc.
    hl to what af', bc' etc ... bc, de and hl with bc', de' and hl'.

    Also ...
    StuBruise StuBruise June 2008 Emulators
  • Console frameworkStill working on Specotron, but at the point where working out the diagonal lines collision is not good at beer o'clock. In the meantime I've knoc…

    ... input beyond cursor
    CAPS+5678: Move cursor within input buffer ... br /> ld l, a
    add hl, hl
    add hl, hl
    add hl, hl ; HL = char ... br /> ld hl, cursor_row
    dec (hl)
    ld hl, cursor_prev_row
    dec (hl)
    ld a ...
    Paradigm Shifter Paradigm Shifter September 2022 Development
  • Assembler code from tutorial, problem!I was wondering if anyone could help me decipher this z80 assembler code? ORG 60000 LOAD 60000 EA60 21BCEA LD …

    ...

    EA60 21BCEA LD HL,NMBRS ;HL = start of digits
    EA63 ... update it
    EA67 77 LD (HL),A ;replace digit in memory ... not, else
    EA6C 3680 LD (HL),80H ;reset digit to zero ...
    Duxbuz Duxbuz August 2001 Sinclair Miscellaneous
  • Short Z80 QuizQ1) Which program gives different result ? A) XOR A ADD A,A B) XOR A ADC A,A C) SCF ADD A,A D) SCF ADC A,A Q2) What is the equivalent of NEG …

    ... /> LD B,10
    LD HL,60000
    LOOP: LD (HL),B
    INC HL
    LD BC,10
    LD HL,60000
    LOOP: LD (HL),C
    INC HL
    DEC BC
    LD ...
    Dr BEEP Dr BEEP July 2002 Games
  • VSYNC FunctionI have written a VSYNC function, so that I can clear the screen before redraw without flicker on the screen, I do this by peeking at the address 2367…

    ... /> VSYNC:
    EI
    LD HL,(vsyncst)

    VSYNCLP:< ... br /> LD A,(23672)
    CP L ... /> JR Z,VSYNCLP
    LD (vsyncst),A
    DI< ...
    robpearmain robpearmain May 2004 Development
  • How to get Grahics to wrap vertically around the screen?I am using the following code to draw an image to the screen. First I use HL to contain ROW and COLUM I then call the MapScreenFunction As I draw m…

    ...
    prtiv1: ld a,(de)
    or (hl)
    ld (hl),a
    inc ... de
    inc l
    ld a ... ,(de)
    or (hl)
    ld (hl),a
    inc ...
    robpearmain robpearmain May 2004 Development
  • FAST PIXEL DRAWINGI'm looking for the fastest way to put a pixel to the screen (on spectrum ofcoz:). Here is my own procedure (written in PASMO). But I don't how do it…

    ... br /> putpix proc

    ld a,e ; 0-63 or ... /> ld c,a
    ld a,(bc)

    ld b,(hl)
    or b
    ld (hl), ...
    zxmaniac128 zxmaniac128 May 2004 Development
  • TASM, Z80 and Spec emusHi! Having some novice questions here regarding TASM and writing machine code for the Speccy emus... Now I have configured TASM into my EditPlus and…

    ... /> LD HL,16384
    LD (HL),255
    INC HL
    LD (HL),128
    INC HL
    LD (HL ... ),255
    INC HL
    LD (HL ... ),128
    INC HL
    ekoman ekoman July 2004 Development
  • IM 2 interrupts and smooth scrolling - easy peasy!Okay, been fiddling around with IM 2 and have actually mastered (I think) how to use IM 2! Now I run my game Ragnar Revival in IM2 and use HALT to sy…

    ...
    push hl
    ld hl,16384
    inc (hl)
    pop hl
    ei ... 58853
    ld (hl),229
    ldir

    ld hl,58853 ;Create a ... : lsb,msb
    ld (hl),0BAh
    inc hl
    ld (hl),088h

    ekoman ekoman July 2004 Development
  • Pixel setting / general speccy codingi just started doing some cross-coding with the [url="http://www.bigfatpanda.fsnet.co.uk/z80.html"]Z80 SNA assembler[/url] and an emulator, and this …

    ... /> ld hl, lineptrs
    add hl, de
    add hl, de
    ld e, (hl)
    add hl, de
    ex de, hl
    ld hl, pixelmsk
    ld a, c ... /> ld b, (hl)
    ex de, hl
    ld a, (hl)
    xor b
    ld (hl ...
    Lambchop Lambchop August 2004 Development
  • need help with speed optimization. this procedure draws a sprite with mask from memory onto the screen with x-coordinate in pixels. it doesn't shift sprites in realtime, it just uses …

    ... br /> EXX
    LD HL,(SPRADR) ; taking precalculated screen ... LD A,(HL)
    AND B
    OR C
    LD (HL ... ),A
    INC HL
    POP ...
    moroz1999 moroz1999 August 2004 Development
  • Machine Code Sprites Example Code Using Char Based SystemBelow is my WIP code to do smooth screen wrapping sprites using char positions and offsets, as opposed to writing direct to a line (0-191) and shifti…

    ... )
    LD D,0
    LD HL,gfx
    ADD HL,DE
    ps01:

    LD E ...
    PChar:
    LD A,(DE)
    LD (HL),A
    INC DE ...
    robpearmain robpearmain August 2004 Development
  • IM2 Machine Code Sprites Example Code Using Char Based SystemFurther to my earlier post, here are sprites running using char method with IM2 driving it Note, for 48k spectrum using TASM [code] ; ***********…

    ... )
    LD D,0
    LD HL,gfx
    ADD HL,DE
    ps01:

    LD E ... pp1:
    ld (hl),C ; LD (0FE00h),FDh
    inc hl ; repeate 253 times ...
    robpearmain robpearmain August 2004 Development
  • Smooth Color Masked Sprites using fast page flip on 48kHere is a quick demo of using char based sprites using the Page flip method: a) Background is copied to buffer b) Sprites drawn on buffer c) Buffer …

    ... /> INC HL
    LD (HL), D
    INC HL
    POP DE
    LD (HL), E ... /> INC HL
    LD (HL), D
    INC HL
    POP DE
    LD (HL), E ...
    robpearmain robpearmain September 2004 Development
  • Smooth Masked Sprites using fast page flip on 48k Part 2Ok, After all the suggestions in Part 1, which were all excellent (Thankyou), I opted on the following: I have 2 x 6k Offscreen areas (Yes, that's …

    ...
    prelp:
    LD (HL),%11111111
    INC HL
    LD (HL),%00000000
    INC ... /> LD HL,SCREEN+16 ; Destination
    LD (hl3+1),HL
    EXX
    LD HL,BACKBUFFER ...
    robpearmain robpearmain September 2004 Development
  • Smooth Screen Scrolling RoutineHi everyone, this is a follow up to the thread on smooth screen scrolling. As promised here is the code for the routine. It's pretty long and fairl…

    ... DI

    LD (SCRMODA+1),HL

    LD HL,(SCRPOS) ;SCROLL POSITION ... /> SBC HL,BC

    LD A,(DE)
    OR (HL)
    LD (HL),A ... /> LD HL,(MODHLB+1)

    LD A,(HL)
    INC L
    LD H,(HL ...
    dmsmith dmsmith September 2004 Development
  • The incredible shrinking screendumpIn this topic I stated that I would be impressed if the screendump could be smaller than 37 bytes. [url="http://www.worldofspectrum.org/forums/viewt…

    ... , B 0
    nline ld hl,table-1 ; Use JR value ... 0 after 256 times
    ld b,(hl) ; B = high byte ... next byte in table
    ld e,(hl) ; Fetch 'last' byte ... in table
    prbyte ld a,(hl) ; Fetch byte for print ...
    Dr BEEP Dr BEEP September 2004 Development
  • Help needed to speed up functionCan anyone help me to re-factor this code snippet. The "MAP" section holds information about which tiles go where on the screen (handled by another f…

    ... NOTDIRTILE PUSH HL
    LD (HL),A
    INC L
    LD (HL),A
    LD (HL),A
    INC L
    LD (HL),A
    POP HL
    INC HL ...
    Mr Millside Mr Millside February 2005 Development
  • Anyone help re-factoring a tile functionI had some excellent feedback for re-factoring my function that displays the colour for my screen tiles. Can anyone offer some help to improve the fu…

    ... />

    PRINTTILE LD B,16
    MAPLUMODIFY LD HL,(MAPLOOKUP) ; This value ... ,(HL)
    LD (DE),A
    INC HL
    INC E
    LD A,(HL ...
    Mr Millside Mr Millside February 2005 Development
  • Fastest way to write something to screen$Hi, I just got pasmo.exe and start playing with attr scrolling, well, not scrolling, just write different values to a block and see if I can introdu…

    ... sure about the push vs ld (hl),a.
    NOTE: This ...

    LD (OLDSP),SP
    LD SP,base+len
    LD BC,len/2
    LD D,val1
    LD E, ...
    DEC BC
    LD A,B
    OR C ... br /> JR NZ,LOOP
    LD SP,(OLDSP)
    ENDM ; SFILL ...
    AE.Vasconcelos AE.Vasconcelos April 2005 Development
  • Best method for sprite collision detectionHi, I have been trying to incorporate collision detection into a sprite routine I writing. The following is what I have come up with so far: POP D…

    ... mask, d=sprite image
    LD A,(HL) ; hl = screen addr.
    AND ... detected
    EXX
    INC (HL) ; increase if there is a ... br />
    NC0:
    LD A,(HL) ; draw sprite as normal
    OR D ;
    LD (HL),A ;
    INC L ;
    dmsmith dmsmith August 2005 Development
  • Programming MC : first stepsIsn't nice to collect all kinds of short routines to help making the first steps into MC for everyone who never touched MC? What I mean is mostly th…

    ... />
    start ld hl,(23672)
    ld (seed),hl ; RANDOMIZE equivalent
    ld a,6 ... does 0 n-1
    ld hl,(seed) ; fetch RND pointer
    Dr BEEP Dr BEEP August 2005 Development
  • MC TipPlace your MC tip here: Here is my first: When using alternate registers (EXX) the HL register must not be affected on return to BASIC. Also the IY…

    ... alternate registers (EXX) the HL register must not be affected ... start

    exx
    ld (savehl),hl
    exx
    ........ ; do ... program
    exit exx
    ld hl,(savehl)
    exx
    ret ...
    Dr BEEP Dr BEEP November 2005 Development
  • Optimisation Needed! Is this the Fastest way to copy bytes from screen and back again?I have the screen address (say 0,0 i.e 16384) I want to copy 4 bytes wide by 32 bytes high from the screen to an area of memory. I then want to cop…

    ... /> ld hl,16384
    ld (c2sc_dest+1),hl
    ld hl,store
    ld (c2sc_source+1),hl
    robpearmain robpearmain November 2005 Development
  • Machine Code: quicksort optimisationI came across this z80 quicksort implementation when going through the wikipedia article on the same. It's 44 bytes long. I was wondering if any of …

    ... /> qsort ld hl,0
    push hl
    qsloop ld h,b
    ld l ... /> ld (bc),a
    ld a,h
    ld (de),a
    pop hl ...
    Arjun Arjun January 2006 Development
  • Spin save dissembly problemHey Dunny and others Spin dudes! There seems to be a small problem with the save dissembly function from the dissembler in Spin. This is the exact o…

    ... /> ld hl, l29699 ; 26564 10ts
    ld (26511 ), hl ; 26567 16ts
    ld hl, l29735 ... ; 26570 10ts
    ld (26513 ), hl ; 26573 16ts
    ld hl, l29708 ...
    Kiwi Kiwi May 2006 Emulators
<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
hl 6.2K 48K
5678 32 35

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
  • 33 ld hl xxxx
  • screen buffer pop bc ld sp hl
  • ld 23641 hl

Copyright © 2024 World of Spectrum