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.014s
<1234567…34>
  • machine code loadercan someone have a look at this loader and break down what its actually doing and also how i can stop it from executing the 2 loads of headerless blo…

    ... ORG $5B00
    LD HL,BASIC
    LD (23641),HL ;E_LINE=address of BASIC ... ORG $5B00
    LD HL,BASIC
    LD (23641),HL ;E_LINE=address of ... ;Signal line execution
    LD (IY+10),1 ;NSPPC ...
    Battle Bunny Battle Bunny August 2011 Sinclair Miscellaneous
  • machine code loadercan someone have a look at this loader and break down what its actually doing and also how i can stop it from executing the 2 loads of headerless blo…

    ...
    LD HL,(23613) ;(ERR_SP)
    LD (HL),$EF
    INC HL
    LD (HL),$D1 ;return ... after loading program
    LD HL,BASIC
    LD (23641),HL ;E_LINE=address of BASIC ...
    Battle Bunny Battle Bunny August 2011 Sinclair Miscellaneous
  • Undefine functionHere's a routine to selectively remove variables from the VARS area and reclaim the space. This can be done partially from BASIC already by assigning…

    ... AEDCB
    E_LINE: equ 23641
    CH_ADD: equ 23645 ... UNDEF: ld hl,14
    add hl,sp
    ld sp,hl ;undo USR ... STRARR: inc hl
    ld c,(hl)
    inc hl
    ld b,(hl) ;BC= ...
    Battle Bunny Battle Bunny January 2012 Sinclair Basic
  • joining lines of BASICDue to overwhelming demand - well, one demand - well, more of a suggestion, really - here's a routine to join together lines of BASIC. The vertical c…

    ... DE,HL ;DE=new cursor position
    LD HL,(23641) ;E_LINE
    SBC HL,DE ...
    JR C,DOMOVE
    ld a ...
    Battle Bunny Battle Bunny February 2012 Sinclair Basic
  • Using BASIC from Machine CodeHi Folks, Came across a very interesting article by Toni Baker in Your Spectrum: http://www.users.globalnet.co.uk/~jg27paw4/yr11/yr11_66.htm …

    ...
    PUSH HL
    CALL 5808
    LD HL,(23641)
    LD BC,130
    CALL 5717
    INC HL
    LD HL,(23613)
    PUSH HL
    LD HL,BACK
    PUSH HL
    LD (23613),HL
    Paddy Coleman Paddy Coleman August 2017 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…

    ... word2
    MACRO swap_word
    ld a, (hl) ; 7
    ex af ... , af' ; 4
    ld a, (de) ; 7
    ld (hl), a ; 7
    ld a, (de) ; 7
    ld (hl), a ; 7
    pop af
    pop hl
    ld c, a
    jr .heapify_words_body ...
    Paradigm Shifter Paradigm Shifter July 2022 Development
  • saving part of a BASIC programHere's a short routine to save part of a BASIC program. The idea is that it can be merged into a program and then used to save sub-routines, etc. to …

    Here's a new version of my routine which now allows multiple saves and saving of variables; even so, it's about 80 bytes smaller than the original version (about 1kb). To save space the m/code is now in a DATA line instead of a separate variable. The first ...
    Battle Bunny Battle Bunny September 2011 Sinclair Basic
  • 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…

    ... /> LET ELINE=FN p(23641): POKE 23627,PEEK 23641: POKE 23628,PEEK ... />
    ld hl,(23613) ;(ERR_SP)
    ld sp,hl ;reset stack

    ld hl,$1b9e ...
    Battle Bunny Battle Bunny September 2013 Development
  • that "listing variables during runtime" thingWell, I did eventually finish this, but with my meds playing up I don't have much time each day that I can spend at the computer, so it's taken rathe…

    I've updated FindVars (the precursor to DumpVars) to include the feature from DumpVars which assigns a separate variables area for the routine so its own variables don't get mixed up with the other program (the old version is in the [url=http://www.users. ...
    Battle Bunny Battle Bunny March 2014 Sinclair Basic
  • LINE-routine and other nice pieces of codeThe line-topic came in the end with a nice piece of fast coding. I think that there might be more of these routines out there (where-ever-u-r). Isn…

    ... me..)

    INIT...LD B,hightable ; B = constant ... through the program
    .......LD DE,0
    .......JP ... /> .......LD L,A ; HL points to highbyte (4)
    .......LD H,(HL) ; ... fetch highbyte (7)
    .......JP (HL) ; jump ...
    Dr BEEP Dr BEEP October 2001 Sinclair Miscellaneous
  • 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…

    ... /> ld l,h
    ld h,0
    add hl,hl
    ld de ... add a,(hl)
    inc hl
    ld h,(hl)
    ld l,a
    prtiv1: ld a,(de)
    or (hl)
    ld (hl),a
    ... l
    ld a,(de)
    or (hl)
    ld (hl),a
    ...
    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
  • 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 …

    ... hl, de
    add hl, de
    ld e, (hl)
    inc hl
    ld d, (hl ... )
    ex de, hl
    ld d ... /> 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 …

    ... ,L
    LD L,A
    LD A,(HL)
    LD (DRAWB1+1),A ... ,L
    LD L,A
    LD A,(HL)
    LD (DRAWE1+1),A ...
    moroz1999 moroz1999 August 2004 Development
  • Calculate screenaddressWho knows where the topic about the fastest screenaddressroutine is? I can't find it in a search.. The fastest routine was to load a large table of …

    ... * 256 = 64000
    LD L,C
    LD A,(HL) ; first part of ... H
    LD H,(HL) ; Fetch Hi-byte
    LD L,A
    RET ; HL holds screenaddress
    Dr BEEP Dr BEEP 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 ... /> EX DE,HL
    LD SP,HL
    EX DE,HL
    LD D,H ... /> 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
  • 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…

    ... ,(HL)
    LD (DE),A
    INC HL
    INC E
    LD A,(HL ... )
    LD (DE),A
    INC HL ...
    Mr Millside Mr Millside February 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 ... 0 n-1
    ld hl,(seed) ; fetch RND pointer ... br /> ld (seed),hl ; store next RND-pointer
    ld a,(hl) ; ...
    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
  • 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
  • Problem with rotating procedureHi folks! I wrote a proc in z80 asm, based on: x' = x * cos (z) - y * sin (z) y' = x * sin (z) + y * cos (z) I used a precalculated table of sin a…

    ... /> add hl,bc
    ld e,(hl)
    inc hl
    ld d,(hl)
    ld hl,(x ... /> add hl,bc
    ld e,(hl)
    inc hl
    ld d,(hl)
    ld hl,(y ... /> add hl,bc
    ld e,(hl)
    inc hl
    ld d,…
    xor xor July 2006 Development
  • In Machine Code, what is the quickest way to sort bytes?I am playing around with some ordering of sprites, where I want to order them by vertical position. I used some Rodnay Zaks code to order some bytes…

    ... /> ld hl,numbers
    ld bc,7

    bubble ld (temp),hl ; temp = (hl)
    again ld ix,(temp) ; ix ...
    robpearmain robpearmain August 2006 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