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>
  • 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…

    ...
    We'd like to 'sub hl,de' but there's no such ... de,9
    add hl,de
    ld (hl),a
    inc hl
    ld (hl ... de,9
    add hl,de
    ld (hl),a
    inc hl
    ld (hl ... de,9
    add hl,de
    ld (hl),a
    inc hl
    ld ( bigjon bigjon November 2009 Development
  • Clearing the Carry flagI'm reading that sometimes I may want to clear the carry before using ADC or SBC. A simple AND A or OR B will do. However, as I see it, for 8-bit ar…

    ... / SBC than there are ADD / SUB ops. Although you can do ... no such option as:
    SUB HL, DE
    but there is
    BloodBaz BloodBaz January 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…

    ...
    We'd like to 'sub hl,de' but there's no such ... de,9
    add hl,de
    ld (hl),a
    inc hl
    ld (hl ... de,9
    add hl,de
    ld (hl),a
    inc hl
    ld (hl ... de,9
    add hl,de
    ld (hl),a
    inc hl
    ld ( buzzy buzzy September 2012 Development
  • 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…

    ... were versions of the ADD, SUB, ADC, SBC, XOR, AND and ... register, so why not ADD, SUB etc. too?

    (Yeah ... />
    Oh, and also SUB HL,DE and SUB HL,BC. Why were they missing???
    SkoolKid SkoolKid November 2012 Development
  • 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…

    [QUOTE]Oh, and also SUB HL,DE and SUB HL,BC. Why were they missing???[/ ... />
    OR A
    SBC HL,DE

    Remember also that ...
    Ralf Ralf November 2012 Development
  • 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…

    ...
    Oh, and also SUB HL,DE and SUB HL,BC. Why were they missing ... to use ADD HL,DE to overflow as a SUB HL,DE replacement, or ... (or not) and do SBC HL,DE?

    [QUOTE= ... instead of 'SUB' HL,DE (de is 32)

    ADD HL,DE (de is 65504) gives ...
    R-Tape R-Tape November 2012 Development
  • 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…

    ... =SkoolKid;661292]Oh, and also SUB HL,DE and SUB HL,BC. Why were they ... />
    The fake instruction LD HL,DE for example, is internally converted ... and time a supposed LD HL,DE instruction would use (taking into ...
    mcleod_ideafix mcleod_ideafix November 2012 Development
  • The Pros and Cons of "alternative" assembler syntaxContinuing from [URL]http://www.worldofspectrum.org/forums/showpost.php?p=720754&postcount=72[/URL] [QUOTE=u6c87;720754]But that wouldn't change if…

    [QUOTE=introspec;721102]SBC HL, DE?[/QUOTE]

    But you can't SUB HL, DE. SUB only applies to A.
    John Elliott John Elliott September 2013 Development
  • The Pros and Cons of "alternative" assembler syntaxContinuing from [URL]http://www.worldofspectrum.org/forums/showpost.php?p=720754&postcount=72[/URL] [QUOTE=u6c87;720754]But that wouldn't change if…

    ... 721106]But you can't SUB HL, DE. SUB only applies to A.[/QUOTE ... /> DEC BC BC-
    INC (HL) [HL]+ [H]+ M+
    DEC ( ... HL,BC HL+BC H+BC H+B HL+B
    ADD IX,DE ... X+DE ... X+D
    SBC HL,HL HL-*HL HL-*H
    ...
    introspec introspec September 2013 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…

    ...
    push hl
    add hl, de
    pop de
    ex de, hl
    swap_word ... /> // Recursively heapify the affected
    // sub-tree
    heapify(arr, n ...
    Paradigm Shifter Paradigm Shifter July 2022 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…

    ... br /> ld a,h
    sub 8
    ld h,a ... hl,hl
    ld de,scrtable
    add hl,de
    add a,(hl)
    inc hl ...
    ld h,(hl)
    de)
    or (hl)
    ld (hl),a
    inc ...
    robpearmain robpearmain May 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 A,(IX+3)
    SUB (ix+7)
    ld ... /> LD A,8
    SUB (ix+7)
    ld ( ... Z,l01

    SUB (IX+6)
    LD (IX ... br /> ps0:
    ADD HL,DE
    DJNZ ps0
    ...
    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 A,(IX+3)
    SUB (ix+7)
    ld ... /> LD A,8
    SUB (ix+7)
    ld ( ... Z,l01

    SUB (IX+6)
    LD (IX ... br /> ps0:
    ADD HL,DE
    DJNZ ps0
    ...
    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 …

    ... SP
    EX DE, HL
    LD SP, HL
    EX DE, HL

    LD A,8
    SUB E ; take it from 8 ...
    ADD HL,DE ; Add onto GFX
    EX DE,HL ; Let DE now point ...
    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 …

    ... br /> LD A,8
    SUB E ; take it from 8 ... br /> ADD HL,DE ; Add onto GFX
    EX DE,HL ; Let DE now point ... br /> LD HL,0
    LD DE,16
    ADD HL,DE
    LD ...
    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…

    ...
    LD A,4
    SUB B
    ADD A,A ... />
    LD A,5
    SUB C
    LD (COLMODA+1 ... ,CLOOPB


    EX DE,HL ;DE = SCREEN ADDR.

    ZERO ... in background data table
    SUB 12
    LD L,A ...
    dmsmith dmsmith September 2004 Development
  • 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…

    ... /> jr nc,fin21
    add hl,de
    adc a,0
    ;argumenty: hl i de
    ;wynik: hl i de
    ;============================================================================
    ... />
    ld a,e
    sub c
    ld e,a ...
    xor xor July 2006 Development
  • help sought with first foray into machine code - pixel scrolldownI have started to code my first machine code program, a simple roadrace game. I've based it around the pixel scrolldown routine in 40 Best Machine Co…

    ... if not line2 yet
    sub a ;?? prepare blank byte ... into accum??
    sbc hl,de ;move pointer of line to ... /> add hl, de ;to posn to be copied
    ex de,hl ;?? but ... next line up
    sub 7 ;next line up is ... next line up
    sub 7 ;next line up is ...
    bigjon bigjon February 2008 Development
  • Probing the variables in 128K modeHello again! Briefly, I'm writing an m/c routine to read some BASIC variables. So, before I start, I try to get an idea for the structure of how var…

    ... Z,STRINGARRAY
    SUB 128
    LD DE,19
    PRINT
    ADD HL,DE
    JR NEXTVAR
    STRINGARRAY
    SUB 96
    LASTCHAR
    SUB 128
    JUMP
    LD DE,6
    JR ... PRINT
    ARRAY
    SUB 32
    Digital Prawn Digital Prawn March 2008 Development
  • A fast DRAW routineI was investigating how to speed up the line drawing for the [URL="http://www.worldofspectrum.org/forums/showthread.php?t=20225"]BASIC compiler[/URL]…

    ...
    exx
    add hl, de ; error -= dX
    ... HL = error = DX / 2

    ; DE = -dY
    xor a
    sub ... br /> exx
    add hl, de ; error -= dY
    ld de, (SCREEN_ADDR)
    add hl, de ;; Final screen ...
    boriel boriel December 2010 Development
  • 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…

    ... A,(VECTOR+1) ;65136
    SUB 1
    LD I,A ...
    inc hl
    add hl,de
    dec hl
    ld (hl),":" ;replace ENTER ...
    Battle Bunny Battle Bunny February 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…

    ... ) ; getscharater from charterno variable
    sub 32
    ld e,a ...
    ld hl,coordslookup
    add hl,de
    ld a,(hl)
    push ...
    uglifruit uglifruit August 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…

    ... ld a, b
    sub 4
    and 15
    add hl, de
    ex de, hl
    inc iy ... ld a, b
    sub 4
    and 15
    add hl, de
    ex de, hl
    inc iyl ...
    antoniovillena antoniovillena November 2012 Development
  • Full 16*16-digit BASIC multiplicationI liked Andre Adrian's 32-bit long multiplication routine so much that I decided to a decimal version. After all, 2^63 is only 9223372036854775808, a…

    ... SBC HL,HL ; RESULT BITS 32..47 = 0
    1030 GO SUB EXX ... SBC HL,HL ; RESULT BITS 48..63 = 0
    1050 GO SUB EXX ... LET I=0 : REM ADD HL,DE ; RESULT += MPD
    1121 ... REM LMULNOADD:
    1210 GO SUB EXX : REM EXX
    ...
    Battle Bunny Battle Bunny July 2013 Sinclair Basic
  • 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…

    ... 16-bit value in HL. Can somebody check by ...
    [code]
    ; Input: HL contains a signed 16-bit ... value
    ; Output: HL = ABS(HL)
    ABSFunc:
    BIT ... a SBC HL, DE with HL containing 0 and DE the input ... PUSH, POP, two EX DE, HL and something (OR A) ...
    BloodBaz BloodBaz January 2014 Development
  • Scrolling Bi-Colour Engine for 4-Player GamesJust putting this code up for people to have a look at. Far from finished. Should simply compile and run a bit of a demo. Only good for 128K and +…

    ... /> add hl,bc ;hl = address of start of row
    add hl,de ;hl = address ... ,a
    ex de,hl
    add hl,bc
    ex de,hl ;de = address of ... a,(SPRITE_BASE) ;sprite Y
    sub l
    sla a
    joefish joefish March 2014 Development
  • SBC IX,DE/BCAlways wondered why there wasn't a SBC IX, DE/BC command.... so have to use PUSH HL ; save original HL PUSH IX ; IX on stack POP HL ; IX …

    ... wasn't a SBC IX, DE/BC command....


    PUSH HL ; save original HL
    PUSH IX ; ... into HL
    SBC HL,DE ; do calc
    PUSH HL ; ... IX
    POP HL ; get original HL back again
    ... at the same time, DE is the value to ...
    MatGubbins MatGubbins April 2014 Development
  • ZXSCLZF - Yet another Screen CompressorQuick disclaimer before I continue, this compressor does not shrink screens as small as some of the others posted here, in particular the very good z…

    ... a greedy parser so is sub-optimal, would love to know ... - start screen pos into de
    inc hl ; 6t
    ld a ... - move de on one
    ex de,hl ; 4t - swap hl&de to use ... _ulzfa050 ; 17t - move hl on one
    ex de,hl ; 4t - swap back ...
    TomD TomD April 2017 Development
<1234567…34>

Latest Posts

  • Where to Buy the New or Fairly Recent , Excellent ZX Spectrum Games Software?
    harriusherbartio on 11:40AM
  • 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
  • 1992 Spectrum Software
    harriusherbartio on April 7

HitBox

Word Docs Hits
sub 3.4K 6.2K
hl 6.2K 48K
de 9.7K 27.3K

Related Threads

  • Sort 2 byte words (x, y) on ypos, also question about swap (DE), (HL)Well that was a lot of debugging ;)<br /> <br /> But if you want a routine which takes an array of 16 byte words x, y and then sort them on y (igno…
  • Music on Tour de Force (Gremlin)Has this game really a music somewhere ?<br /> Perhaps the 48K bzz-bzz at the beginning of any level and/or for game over is considered "music" ?<br …
  • Scrabble De-luxe dsk image and SpinAnyone else tries loading the disc file of Scrabble De-Luxe into Spin?<br /> All I get is the loading screen keep appearing and disappearing - as if …
  • Viaje al Centro de la Tierra - questionsI would like to know the following informations about this game:<br /> <br /> 1) What does the title mean in English? I guess that the game is based …
  • Fantastic Voyage Sub PiecesI have a question regarding this game.<br /> They say there are 8 parts to the sub, but I only found the mouth one.<br /> <br /> Do we have to destro…
  • Fantastic Voyage Sub PiecesI have a question regarding this game.<br /> They say there are 8 parts to the sub, but I only found the mouth one.<br /> <br /> Do we have to destro…
  • How many T-states takes PUSH DE ?Hi.<br /> <br /> Just a quick one.<br /> According to z80.info docs, a PUSH DE should take 11 T-States to be executed.<br /> <br /> But WHAT if SP is…
  • Game featuring lots of sub games ?One game i love is the GBA game Warioware Inc. Basically lots of mini games to play.<br /> <br /> I know in Frankie GTH, Cosmic Wartoad (3), Pyjamar…

Related Searches

  • ld hl de
  • sub chase
  • return to basic hl
  • de spectrum
  • la diosa de cozumel
  • los amores de brunilda
  • call hl
  • best sub game
  • viaje al centro de la tierra
  • loading screen viaje al centro de la tierra
  • viaje al centro de la tierra screen
  • en busca de mortadelo
  • escuela de ladrones
  • slt format hl
  • 16 bit hl load
  • jp hl
  • panel de pon
  • ld bc hl
  • sjasmplus sub hl de
  • ex hl de

Copyright © 2024 World of Spectrum