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.171s
<1234567…34>
  • DEC BC/LD A,B/OR C/JP NZ,loopyesterday i saw nice trick:[code] dec bc ld a, b or c jp nz, loop can be replaced (bc starts >255, short jump) by: dec bc inc b djnz loop [/code] …

    yesterday i saw nice trick:[code]

    dec bc
    ld a, b
    or c
    jp nz, loop

    can be replaced (bc starts >255, short jump) by:

    dec bc
    inc b
    djnz loop
    [/code]
    ..nice
    Fikee Fikee February 2005 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 …

    ... routines, CPI):

    [code]searchmem
    xor a ; a = 0
    ld bc ... ld hl, 0 ; start searching at address 0
    search: cpi ; a-( ... /> use

    LD A,B
    OR C

    If RET is ...
    rich_chandler rich_chandler 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 …

    ... /> search: cpi ; a-(HL)
    jr z, found
    ld a, b
    or c ; flag decoy ... . BC==0
    ld a, 0 ; restore A
    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 …

    ... br /> [code]searchmem
    ld bc, 0ffffh ; search the entire ... memory
    ld hl, 0 ; start searching ... /> cpi ; a-(HL)
    jr z, found
    ld a, b
    or c ; ...
    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 …

    ... s worth mentioning that CPI doesn't have to ... BC - 1

    ld a,b
    or c ;BC = 0?
    jp ... something useful here!

    cpi ;HL = HL + 1, BC ... the second routine the CPI isn't being used ...
    Chris Pile Chris Pile January 2009 Development
  • Bit functions speedI just stared nonplussed at the documentation for the bit functions. Apparently, if you're using the accumulator, using AND and OR is faster than se…

    ... br />
    AND imm, OR imm take 7 T states ... modifier' opcodes. Ie a single byte $cb, $dd or $fd was used ... ) is the use of CPI to test if BC is ... br /> dec bc
    ld a,b
    or c
    jp nz, loop< ...
    [code]
    cpi
    jp pe, loop ; or maybe po I ...
    Alcoholics Anonymous Alcoholics Anonymous February 2010 Development
  • Machine code loopsDear all, 30 years too late I know, but I'm finally starting to get to grips with Machine Code - something I could never manage back in my early tee…

    ... another one albeit it's a bit situational. If you have ... ,
    [code] ld bc,n_iterations
    .loop
    dec bc
    ld a,b
    or c
    jr nz,.loop[/code ... ] ld bc,n_iterations
    .loop
    ;(some kinda code)
    cpi ;or cpd ...
    Hikaru Hikaru June 2013 Development
  • Assembly - Loops bigger than 255Hi, It looks like it's a bit difficult to make loops with more than 255 cycles on Z80 machine code, since the 16-bit decrements (DEC) do not alter a…

    ... oooooOOOOOOooooh
    He posted a working solution and asked if ... there was a way to improve it. ... That sounds like a perfectly good example of " ... doesn't show DEC BC/LD A,B/OR C/JP NZ in the ... the point of exploiting CPI when you do not know ...
    catmeows catmeows October 2013 Development
  • Assembly - Loops bigger than 255Hi, It looks like it's a bit difficult to make loops with more than 255 cycles on Z80 machine code, since the 16-bit decrements (DEC) do not alter a…

    ... doesn't show DEC BC/LD A,B/OR C/JP NZ in the first ... . Whats the point of exploiting CPI when you do not know ... /> The basics were pointed out a couple of pages back. The ...
    Arjun Arjun October 2013 Development
  • ZERO Emulator - BugsI have been using Zero emulator to experiment a few routines in assembly, since it has a somewhat usable debugger. However I believe I found a few b…

    ... , you're usually incrementing or decrementing a memory pointer too. And ... :

    [code]
    cpi
    jp pe, loop_again
    dec bc
    ld a,b
    or c
    jp nz, loop_again< ... code size as "dec bc; ld a,b; or c; jr nz,.." but the ...
    Alcoholics Anonymous Alcoholics Anonymous July 2015 Emulators
  • Graphics program in AssemblyHi so I think I'm getting the hang of this so I've done this program. It writes directly to the screen. I'm using ZX Spin. [code] LD HL,16384 LD B,…

    ... /> Loop:
    LD (HL),D
    INC D
    CPI
    JP ...
    [/code]

    The CPI instruction does "INC HL; DEC ... that's a side-effect in this usage.

    CPI+JP ...
    INC HL+DEC BC+LD A,B+OR C+JR -> 6 bytes, 32 ...
    Alcoholics Anonymous Alcoholics Anonymous November 2016 Assembler
  • 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 …

    ... A
    ADD A,A

    B)
    XOR A
    ADC A,A

    C ... /> A)
    LD A,-1

    B)
    CPL
    DEC A

    C ... /> LD A,B
    OR C
    JR NZ,LOOP
    RET

    C)
    LD …
    Dr BEEP Dr BEEP July 2002 Games
  • RST 16 with TASMCan any body tell me what is wong when I assemble this test code with TASM : ;print a long string "help me" start .org 32000 ld a,2 call 5633…

    ... "
    start .org 32000
    ld a,2
    call 5633
    ld de,data
    ld bc,7
    loop ld a,b
    or c
    dec bc
    ret z
    ld a,(de ...
    Steve(spt) Steve(spt) April 2004 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 must ... LOOP

    LD (OLDSP),SP
    LD SP,base+len
    DEC BC
    LD A,B
    OR C
    JR NZ,LOOP
    LD SP,(OLDSP)
    ENDM ; SFILL ...
    AE.Vasconcelos AE.Vasconcelos April 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 …

    ... hl
    qsloop ld h,b
    ld l,c
    or a
    sbc hl ... ,de
    jp c,next1 ...
    Arjun Arjun January 2006 Development
  • Urgent Help needed to fix this: calling all machine code gurusI am currently trying to write tutorials on the amazing Orfeus music composer by Proxima which allows you to do multi channel music through the beepe…

    ...
    dec bc
    ld a,b
    or c
    jr nz,l88c9 ; (-13 ... ,af'
    ld (de),a
    dec bc
    ld a,b
    or c
    jr ... nz,l88eb ; (-13)
    im 1
    ld ...
    robpearmain robpearmain November 2006 Development
  • My little first set of routines.Hi all, I just coded a little set of routines just to draw a screen on video mem and a fade out. I could have just copied the screen rendering rout…

    ... /> push bc

    ld a,b
    or c
    jr nz, DrawLine
    dec bc
    ld a,b
    or c
    jr nz,NextAttr ;Finished ...
    HexDump HexDump April 2007 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…

    ...
    ld bc,32766 ;read keyboard space to b
    in a,(c)
    ld (hl),a
    inc hl
    ld (hl),a
    ;random road left or ... /> ld d,0
    ld e,c
    add hl, de
    ld a,(hl ...
    dec bc
    ld a,b
    or c
    jr nz, wait
    bigjon bigjon December 2008 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…

    ...
    ld bc,32766 ;read keyboard space to b
    in a,(c)
    dec bc
    ld a,b
    or c
    jr nz, wait
    ld bc,32766 ;read keyboard space to b
    in a,(c)
    dec bc
    ld a,b
    or c
    jr nz, wait
    bigjon bigjon November 2009 Development
  • Help needed with simple MCode routineI'm trying to code a routine to clear the screen and I can't figure out why it's not working: ld hl,16384 ld bc, 6144 loop:ld (hl),0 inc hl dec bc l…

    ... 'm trying to code a routine to clear the ... working:

    ld hl,16384
    ld bc, 6144
    ... loop:ld (hl),0
    dec bc
    ld a,b
    or c
    jr nz,loop< ...
    It only clears about a third of the screen.
    Rebelstar without a cause Rebelstar without a cause November 2010 Development
  • Keys redefine routine and key check.I have written some asm code which allows me to redefine keys (for a game etc.), and also allows me to be able to check any keypresses for the redefi…

    ... /> gk_exit: ld a,d ; return the bit thingy
    ld b,0
    ld c,a ; stick ...
    ld b,7 ; number of rows to check
    gdk_loop: ld a,(de ... : dec a
    out (254),a
    dec bc
    ld a,b
    or c
    polomint polomint September 2011 Development
  • editing strings with INPUT LINEHere's the latest in my unpredictable series of utility routines. This one I needed for the SAGE game editor; it emulates INPUT LINE l$ but with the …

    ... /> pop hl
    ld de,(WORKSP)
    ld a,b
    or c
    jr z ... /> sbc hl,de
    ld b,h
    ld c,l
    call $2ab2 ...
    Battle Bunny Battle Bunny February 2012 Sinclair Basic
  • Routine for clearing screenI was looking for a 'nice' way of clearing a screen of graphics in Z80. After a ridiculous amount of time mucking around, this is the best and most …

    ... /> SCREEN_CLEAR_LOOP
    ld a,(hl)
    and e
    ld (hl),a
    inc ... hl
    dec bc
    ld a,b
    or c
    jr nz,SCREEN_CLEAR_LOOP

    ld a,(PRT_CHR)
    sla a ...
    Morkin Morkin March 2012 Development
  • 28-character wide multicolour(ish) on 48k SpectrumLong-time lurker here... I've always been interested in rainbow effects on the 48k Spectrum, mainly from a perspective of "Just what [I]would [/I]ha…

    ... /> DELAY DEC BC
    LD A,B
    OR C
    JR NZ,DELAY
    LD BC,0100H
    LD H,A
    LD L,C
    LD D,A
    LD E,B ...
    LD (HL ...
    AMW AMW April 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…

    ... /> ld a,b
    or c
    jr nz,SFXRTl1
    ld a,(SFXRTDUTY+1)
    add a ...
    Shando Shando September 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…

    ... a
    ld c, a
    ld a, b
    and 248
    add a, c
    ld b, a
    l_b7b5: ld a, b ... /> l_b7db: dec bc
    ld a, b
    or c
    cp 1
    jr ...
    daveysludge daveysludge February 2013 Development
  • Fast way to clear the screen ?So I was wondering fastest way to clear the screen. I've tried this and this works but is it better than CLS ? LD HL,16384 LD BC, 6144 Loop…

    ... /> LD HL,16384
    LD BC, 6144

    Loop:
    LD A,0 ...
    LD (HL),A
    INC HL
    DEC BC
    LD A,B ...
    OR C
    or something ?
    ivanb303 ivanb303 December 2016 Assembler
  • adding colourThis my sound like a real stupid Q but when programing a picture how do i add colour like filling in shapes with colour. What kind of programming sh…

    ... 6/7 FLASH and BRIGHT (or other way 'round)

    org 60000
    ld hl,#5800
    ld bc,768
    l1 ... ld (hl),255
    inc ...
    dec bc
    ld a,b
    or c
    jr nz,l1
    Dr BEEP Dr BEEP July 2002 Sinclair Miscellaneous
<1234567…34>

Latest Posts

  • I am currently watching.....
    Paradigm Shifter on 12:49AM
  • New video about S-video modification on Issue two 48K Spectrum.
    Renegade on April 21
  • Fixed Speccy Software. And which games remained unfixed?
    John Elliott on April 21
  • Happy 40th Birthday to the Amstrad CPC464!
    rich_chandler on April 21
  • Another Birthday! The Game Boy Is 35!
    mel the bell on April 21
  • European Software Titles with an English version
    harriusherbartio on April 21
  • Elusive Strategy Games done by the Smaller or less Prolific Software Houses.
    harriusherbartio on April 21
  • 1992 Spectrum Software
    harriusherbartio on April 21
  • +3 Disk drive motor
    AndyC on April 21
  • Celebrity deaths...
    mel the bell on April 20

HitBox

Word Docs Hits
cpi 101 164
ld 6.3K 67.3K
a 589.5K 1.7M
b 55.2K 190K
or 193.7K 292.9K
c 20.3K 48.8K

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…
  • A hundred or so speccy games up on ebay, ending in a few hours or so!Should have put this up last week really! They end today..ie sunday thou.<br /> <br /> Pretty generic stuff but, all starting at 99p.<br /> <br /> If…
  • Sinclair QL: I'm searching for a Gold Card (or better a Super Gold Card) and a Super HermesIf someone here want to sell his Super Gold Card and Super Hemes I'm a big collector of QL stuff and I will pay very very well.<br /> <br /> Very tha…
  • A Spectrum, a couple of felt tip pens and a lot of free time on Sunday afternoons...In my opinion the best part of having a Spectrum was drawing a game map of the latest Ultimate game in the back page of my geography text book thereb…
  • can someone make manic miner in b.a.s.i.c (oh, the horrors!)can someone make manic miner (or it's first level) in b.a.s.i.c . yes i know this is stupid, but i would like to know what would happen! from matthew
  • jet set willy in b.a.s.i.c (oh, even more horrors!!!!!!!!)what about jet set willy in b.a.s.i.c ? is anyone doing that? i think it's a really bad idea, but it's sure is a funny one! oh yes, i do know a littl…
  • ant attack in b.a.s.i.ccan someone make ant attack in b.a.s.i.c . it may be impossible!<br /> from a 14 year old kid.
  • who do you use 1 key b.a.s.i.c?well how do you. is there a web site about it. i do not have the original instruction book.<br /> from a 14 year old kid (named matthew.......)<br />…
  • I NEED A HAND FINDING A 3D CHESS GAME......WITH A HAND IN ITOk.Firstly - It's not one of the chess games in the archive with the word chess in the title.<br /> ##(Although - The ChessMaster2000 LOOKS very fami…
  • A athlon 3000 32 bit system or a athlon 3000 64 bit systemThey will cost about the same which i was suprised to learn, but which system would you recommend, if i build the 64 bit one, can I still play my 32 …

Related Searches

  • ld a r
  • d a w b
  • ld r a
  • ld a b xor c loop
  • ld a b or c loop
  • play a b c
  • b c bill
  • a m c
  • t a c
  • ld i a
  • ld a 3fh
  • ld a 0 call 5633
  • spectrum 2 a b rgb cables
  • out c a
  • ay out c a
  • screen address c b l
  • ld a 5b5c
  • ld a r counter
  • ld a r rnd
  • ld bc 65533 a 254 out c

Copyright © 2024 World of Spectrum