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>
  • 128 ROM paging alternativeWould this work (with the appropriate code in each ROM)? [code] ; 128 rom paging routine ; use rst 28h with call address stored after restart ;;rom…

    ... /> ld hl, 0x0000 ; sp to hl
    add hl, sp ;

    ld e, (hl) ; (sp ... the stack

    ld hl, bankm ; hl holds address of system variable ...

    back_to_r0
    ld hl, bankm ; hl holds address of system variable ...
    chev chev August 2008 Development
  • Bresenham's line algorithmHelp - I really am struggling to get my head around this algorithm. I don't know why, I coped with Cordic (SIN/COS) and integer divide routines (/10 …

    ... following part...

    LD HL,(real328+$02) ;HL has relative Y value ... /HL to keep X>Y

    LD A,H
    LD ... ,L
    LD L,C
    LD C,A ;swap HL (Y) and ... with SGN Y
    LD A,H ;HL still has relative Y ...
    Jimmy Jimmy August 2008 Development
  • Bresenhams circle algorithmI post here my final circle code to replace, if you want, the one in the ROM. It only uses integer math and runs very fast and is very compact. It is…

    ...

    pop hl



    ld A,E ;Point ...

    pop hl



    ld A,E ;Point ... />
    EXX

    LD HL,$2758 ;HL' must contain $2758 on return ...
    rtunes rtunes September 2008 Development
  • CHANS system variableI modified my original code to incorporate Woody's changes and avoid using the stack: [code] org 60000 save_registers: push hl push de push bc …

    ...

    make_space:
    ld hl, 30720 ; first address after attributes ...
    ld de, (0x5c4f) ; current start ... BC
    ld c, l ;
    ex de, hl ; start of ... channel data to HL
    dec hl
    call 0x1655 ...
    chev chev September 2008 Development
  • So... you want to format your 3.5" as 720K eh?Well, i've been trying to get hold of an application to make proper use of my 3.5" +3 floppy disks but i haven't been able to find any. I stumbled up…

    ... is updated
    LD HL,HEAD0 ; Load HL with the beginning of ... an error
    LD HL,HEAD1 ; Load HL with the beginning of ... DE register will hold HL+1
    LD (HL),$E5 ; The remaining ...
    NaMcO NaMcO December 2008 Development
  • Xor-shift random number generator for Z80[QUOTE=Patrik Rak;320244]Come on, people, [URL="http://www.jstatsoft.org/v08/i14/paper"]xor-shift generators[/URL] devised by Marsaglia, that's the w…

    ... ]
    rnd ld hl,0xA280
    ld de,0xC0DE
    ld a,h ; t ... /> xor e
    ld e,a
    ld a,d ; w = w ...
    Patrik Rak Patrik Rak December 2008 Development
  • New for 2009 - mc onelinersI found the limit of one line and one screen's worth of program really useful in (re-)learning BASIC, so I've decided to carry the format over into m…

    ... /> add hl,de
    ld (hl),a
    inc hl
    ld (hl),a
    ld de ... ,21
    add hl ... /> ld hl,23278 ;initialise car
    ld a,8
    ld (hl),a
    ld (32900),hl ...
    bigjon bigjon December 2008 Development
  • So you want to make a cardgame......but you haven't got a good deck to display. Well here is a fully relocatable routine that will do the job for you. Place the code anywhere in me…

    ... LD HL,14
    ADD HL,SP
    LD SP,HL ; undo USR command
    LD HL ...
    Dr BEEP Dr BEEP December 2008 Development
  • Understanding the StackSorry folks. I guess I'm going to be a pain for a little while. Hope it's ok with everyone. I'm currently studying the stack and wrote the little pr…

    ... /> ld (spp), sp
    ld hl, spp
    inc (hl)
    inc (hl)
    ld sp ... account for this when using LD SP instructions. The removal of ...
    rahtgaz rahtgaz January 2009 Development
  • Thinking in Assembly (first efforts)The following is one small routine to educate myself on a few concepts (jumps, flow control, routines, CPI): [code]searchmem xor a …

    ... the entire memory
    ld hl, 0 ; start searching at ... /> search: cpi ; a-(HL)
    jr z, found ... B]
    found: dec hl ; get found address
    push hl
    pop bc ; ...
    rahtgaz rahtgaz January 2009 Development
  • IN 255 behaviour not emulated in Spectaculator and ZXSpinI'm not speaking about "normal" IN 255 behaviour. All of you know what I'm taking about: IN 255 can be used to "read" screen data as it's retrieved f…

    ... halt
    ld c,255
    ld hl,0
    SigueTest ... in a,(c)
    dec hl ...
    mcleod_ideafix mcleod_ideafix January 2009 Hardware
  • Fastest way to clear a screen.We haven't had an optimizing fun for some time, so let's have some: What's the fastest way to clear a screen (i.e., filling the 6912 bytes at 16384 w…

    ... :
    [CODE]
    LD HL,16384 ; 3B 10T
    LD DE,16385 ; 3B ... 10T
    LD BC,6911 ; 3B 10T
    LD (HL),L ; 1B 7T ...
    Patrik Rak Patrik Rak February 2009 Development
  • Rainbow Generator for 48K Spectrum using PUSHThis is what I came up with from [B]gasman[/B]'s suggestions. It's stable in ZXSpin and ZX32 simulating a 48K Speccy. Anyone like to try it on the …

    ... ld hl,65024 ;254*256=65024
    ld de,65025
    ld (hl),253 ... ;Write once
    ld bc, ... main interrupt routine:
    ld hl,sample_jump ;Sample instruction (see ... pop de
    pop hl
    ld sp,22552+(32*char_row) ...
    joefish joefish May 2009 Development
  • BASin assembler/disassembler issuesI would email Dunny, but his listed homepage is nonexistant, and "send a private message to" seems to ask me to log in each time. He doesn't list an …

    ... /> Doing LD HL, 20+10*32

    is assembled as LD HL, (30 ...
    Gedlion Gedlion May 2009 Sinclair Basic
  • Tips on optimizing some newbie assembly routinesI'm starting to learn some assembly language. The best way to learn is to actually code something you are going to use, so I'm creating a very simple…

    ... /> add hl, hl ; * 2
    add hl, hl ; * 4
    add hl, hl ; * 8
    ld de ...
    na_th_an na_th_an June 2009 Development
  • FLASH EPROM programming on ZXExist any other software for rewriting FLASH EPROM or EEPROM chips on real ZX ? I know only: EEPROM flasher for original DivIDE [url]http://85.132.…

    ... support
    org $5cd0
    ld hl, $4000 ;
    di ... byte as targer adress HL
    ld a, $60 ; ... ; read source byte
    ld (hl), a ; write byte to ...
    velesoft velesoft July 2009 Hardware
  • Machine Code Microdrive File LoaderI've been experimenting with transferring games to run from microdrive. Typically I like to see a loading screen while things are happening, and I li…

    ... /> ;
    main1 ld (err_sp),sp
    ld hl,main2
    ld (hd_11),hl ; execute main2 ... /> ;
    ld hl,filenam
    ld (t_str1),hl ; address of filename
    ;
    ; ld hl,1 ... us
    ;
    ld hl,1
    ld (n_str1),hl ; length of filename
    jp jp August 2009 Development
  • Tinkering with Quique Llar?a's Midi2Ay tool...Im tinkering with Quique Llar?a's Midi2Ay tool, found at: [url]ftp://ftp.worldofspectrum.org/pub/sinclair/tools/pc/midi2ay-0.1.zip[/url] Im not a v…

    ... /> push AF
    pop hl
    ld (R_AF),hl
    ld hl,(R_HL)

    push AF
    pop hl
    ld (G_AF),hl
    ld hl,(G_HL)

    ld hl,(G_AF)
    push hl
    pop af

    ld hl,(G_HL)
    ld ...
    kgmcneil kgmcneil October 2009 Development
  • Tutorial - learn machine code in 30mins[B][I]Message from the moderators[/I] - bigjon has requested that readers' attention be drawn to a better version of this tutorial, one which is easi…

    ... /> fillscreen
    ld (hl),a
    inc hl
    ld (hl),a
    ld de,9 ... /> add hl,de
    ld (hl),a
    inc hl
    ld (hl),a
    ld de ... /> ld hl,23278 ;initialise car
    ld a,8
    ld (hl),a
    ld (32900),hl ...
    bigjon bigjon November 2009 Development
  • Z80 'EXX' ConfusionI was working on a little Z80 routine last evening, and, having run out of registers, resorted to sticking one of the values into a memory location a…

    ... buffer, deliberately using HL as both a memory ...
    LD HL,BYTES

    EXX

    LD HL,32

    LOOP: EXX

    LD (HL),123
    INC HL ...

    EXX

    DEC HL
    LD ...
    RoseCotton RoseCotton November 2009 Development
  • Need help with interrupts againI'm fighting to understand how interrupts code handling works I'm trying to set my simple own interrupt routine, as I don't want to be dependent on …

    ... interrupt
    DI

    LD HL,23296 ;fill 256 bytes with ... 255
    LD DE,23297
    LD BC,255
    LD (HL),C
    LD HL,77*256+237


    LD (65525),HL

    LD A ...
    Ralf Ralf November 2009 Development
  • Silent ROM Beeper Routine in SpinA new year -- a new idiot question! :) I've been playing around with Spectrum sounds of the old, beepy kind. When I wiggle[1] the speaker 'by hand' …

    ... ] ORG 25000

    LD HL,400
    LD DE,400
    CALL ...
    RoseCotton RoseCotton January 2010 Development
  • tricks to simplify codingWhen i started with programming in assembler i had very simple approach to do things. Just shifting bytes around, doing simple tests and so... Later …

    ...
    [CODE]
    call_from_table
    ;HL = table
    ;A = ITEM
    ld a, (hl)
    inc hl
    ld h, (hl)
    ld (call_from_table2 + 1), hl
    [CODE]
    ld a, (ix + FRAC_PEN)
    ld hl, p2_fracpentab
    call ...
    Fikee Fikee March 2010 Development
  • Some TR-DOS technical questionsHi forum, I sincerelly hope this was the right section of yours to ask this kind of stuff in. (else return facepalm;) Anyway, here's a couple of que…

    ... crc.

    [code]l_addr ld hl,buffer ; the address to load ... [/code]

    Output in (HL):

    +0 - track no ...
    Hikaru Hikaru April 2010 Development
  • +3 assembler questionI was wondering if anyone could give any suggestions as to how to get this bit of code working on the +2A/+3 in 128k mode. It works on the +128k/+2 i…

    ... LIST_SP
    LD A,(23622)
    LD (23616),A
    LD A,(23610 ... ;OSPCC - CONTINUE statement number
    LD HL,(23641) ;E_LINE - address of editor ... it
    EX DE,HL
    LD (HL),$e8 ;insert code for "CONTINUE ...
    Battle Bunny Battle Bunny August 2010 Sinclair Basic
  • Common pitfalls and solutionsLet's discuss some of the common problems in Speccy programming, and the methods we use to avoid them. For an example, here is a piece of code that …

    ... /> LD HL,#1303
    PUSH HL
    LD (#5C3D),SP
    LD HL,#1BB0
    PUSH HL ...
    LD HL,(#5C4F)
    LD ...
    Hikaru Hikaru August 2010 Development
  • Z80 Machine Code Question...Hi Folks, I know not strictly a BASIC question but I have started to learn Z80 machine code - 25 years too late! :smile: I have been reading a book…

    ... ][FONT="Courier New"]LD BC,1400h
    LD HL,4000h
    LD(HL),FFh
    Paddy Coleman Paddy Coleman August 2010 Sinclair Basic
  • Using the stack to copy memory blocksA [b]PUSH[/b] and a [b]POP[/b] instruction together take less time than two [b]LDI[/b], so long [b]POP/PUSH[/b] sequences are sometimes used to copy …

    ... /> ld ix, source
    ld hl, dest
    ld de, 8 ; stepsize
    ld a ... = 54

    ld sp, hl ; 6
    push hl ; 11
    push ...
    ajmoss ajmoss August 2010 Development
  • Machine code issue...Hi Folks, My trials with MCODE continue and I am stuck. I wrote the following program in BASIC to simply POKE an attribute byte in to a "box" on th…

    ... ;Store Y
    2100FA LD HL,64000 ;HL=Address of Y
    ... (HL)
    CB26 SLA (HL) ;64000=Y*32
    2A00FA LD HL,(64000) ;HL= ... Y*32
    3200FA LD (64000),A ...
    Paddy Coleman Paddy Coleman September 2010 Sinclair Basic
<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