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.015s
<1234567…34>
  • 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 …

    ... pop de ; 10
    pop hl ; 10 Subtotal = 54
    ... br /> ld sp, hl ; 6
    push hl ; 11
    push ... br />
    add ix, de ; 15
    add hl, de ; 11
    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…

    ... =ATTR Address
    09 ADD HL,BC ;HL=HL+ATTR Address
    ED4B01FA LD ... ) ;BC=X
    09 ADD HL,BC ;HL=HL+X
    3A02FA LD A ... DE,32
    19 ADD HL,DE ;Add 32 to Address
    ...
    Paddy Coleman Paddy Coleman September 2010 Sinclair Basic
  • Optimization for this codeHello, I have done and submitted a small program for the CSS Crap Game Compo which involves a machine code routine. The z80 with BASIC and MC is av…

    ... />
    ld de, 160
    add hl, de

    inc l ... the correct screen address into HL
    ; did not had ... /> call 0x1601

    ld hl,text
    loop ld a ...
    rst 16
    inc hl
    jr loop
    text ...
    Rickard Rickard October 2010 Development
  • Why doesn't my routine work?I have a "level" defined by 504 bytes (28 squares across x 18 squares down) I'm trying to write a routine that will take an X,Y coordinate in pixels…

    ... value for later
    add hl, hl ;
    add hl, hl ;
    add hl, hl ;x8 (32x original value ...
    sekrets sekrets December 2010 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]…

    ... br />
    exx
    add hl, bc ; error += dY
    ... While loop
    exx
    add hl, de ; error -= dY
    exx
    add hl, bc ; error += dX
    add hl, de ;; Final screen addr ...
    boriel boriel December 2010 Development
  • Small Machine Code Routines Which Maybe UsefulAs part of creating Flynn's Adventure in Bombland I created a lot of little routines to do all sorts of things. A lot of these I created based on inp…

    ... plot
    add hl,hl ; 11t - x2
    add hl,hl ; 11t - x4
    add hl,hl ; 11t - ... location ($3C00)
    add hl,bc ; 11t - move hl to correct position in ... - convert to screen address
    add a,l ; 4t
    ld ... ; 4t
    add a,32 ; 7t - add 32 or one char ...
    TomD TomD April 2011 Development
  • (part of) screen to UDGHere is a routine to copy a Y,X-position on screen to a UDG. 0<=y<=23 0<=x<=31 144<=udg<=165 (UDG "A" to UDG "U") [code] ; start code with ; PRINT …

    Here is a routine to copy a Y,X-position on screen to a UDG.
    0
    Dr BEEP Dr BEEP June 2011 Development
  • automatic relocating of non-relocatable codeI was pondering upon the problem of changing absolute addresses used by CALL, JP, etc. when code is moved, without reassembling at the new location; …

    ...
    ld hl,CHANGE
    add hl,bc
    ... /> add hl,bc
    ex de,hl
    pop hl
    add hl,bc< ... br /> ex de,hl ;HL ...
    Battle Bunny Battle Bunny August 2011 Development
  • Tile based graphics and scrolling thingy...Here's my best attempt so far at a tile based rendering and scrolling routine. It draws in 22 8*8 graphics tiles along the top of the screen (junk i…

    ...

    add hl,hl ; ASCII code * 8
    add hl,hl
    add hl,hl

    ... immediate value, faster!

    add hl,de

    ex de ... before POPing HL
    inc (hl)

    pop hl ; Restore HL and ...
    Zoltar Zoltar September 2011 Development
  • Lord Of The Rings; Files skipped ?Hi folks, Does anyone know what blocks 8~13 are for in the Lord of The Rings: [url]http://www.worldofspectrum.org/infoseekid.cgi?id=0006601[/url] I…

    ... [code]
    61440 LD HL,61440
    61443 LD DE ... JP 01366
    61584 ADD HL,BC
    61585 JR ... /> 61669 PUSH HL
    61670 PUSH HL
    61671 ... 61678 LDIR
    61680 POP HL
    61681 RET
    61693 LD HL,(57149)
    [/code]
    Andrew Barker Andrew Barker October 2011 MIA/STP/SDP
  • AND,XOR,OR,BIT,RES,SET,CPL,NEG,RLC,RRC,SLA,SRL,RL, RR,SRA for BASICAs this was drifting away from the original INKEY$ thread I thought that I'd create a new one. So here's a routine to provide all of the above mentio…

    ... /> LOGIC: ld hl,12
    add hl,sp
    ld sp,hl ;undo USR ... af
    ld hl,OPCODES
    add hl,bc
    add hl,bc
    ld ... * 8
    add a,c
    LDOPC2: ld (hl),a
    EVALOP ...
    Battle Bunny Battle Bunny October 2011 Sinclair Basic
  • tiny routine to shift RAMTOP & stackCompressing some data areas above RAMTOP and wanting to make the released space available for BASIC arrays, I needed to move RAMTOP without using CLE…

    ... HL, 18 ; 33 18 0
    ADD HL, SP ; 57
    LD SP, HL ...
    Battle Bunny Battle Bunny November 2011 Sinclair Basic
  • BREAK from GOSUBHere's another one. Just in case you wanted to break out of multiple GOSUB levels with a single command, here's a routine to do it, tested on all mod…

    ... ;Discard all but
    ADD HL, SP ; 57 ;STMT_RET ... BC ; 193
    POP HL ; 225
    POP DE ... 217
    NOGSUB: PUSH HL ; 229
    PUSH DE ...
    Battle Bunny Battle Bunny December 2011 Sinclair Basic
  • Procrustean PrintingHere's a short routine to manage printing of text with command tokens, to avoid messing up the screen when they are expanded. It just prints as many …

    ... ;
    STACK: ld hl,14
    add hl,sp
    ld sp ... ,hl ;undo USR
    GETARG: ... print a character
    pop hl ;HL=string pointer
    djnz SSNEXT1 ...
    Battle Bunny Battle Bunny December 2011 Sinclair Basic
  • Indirect Variable AssignmentHere's another wacky routine. This allows assignment of values to variables where the source & destination variables can themselves be defined in var…

    Here's another wacky routine. This allows assignment of values to variables where the source & destination variables can themselves be defined in variables (or expressions which evaluate to variables). Some of this can already be done with VAL or VAL$, ...
    Battle Bunny Battle Bunny January 2012 Sinclair Basic
  • 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…

    ... "...,"argn"];
    UNDEF: ld hl,14
    add hl,sp
    ld sp ... ,hl ;undo USR
    ld ix ...
    NOTFOR: ex de,hl
    add hl,bc
    ld b,h ...
    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…

    ...
    inc hl
    add hl,de
    dec hl
    ld (hl),":" ;replace ENTER ... de,hl
    add hl,bc ;HL=joined length
    ex de,hl
    ld (hl ...
    Battle Bunny Battle Bunny February 2012 Sinclair Basic
  • Inefficient code in ROM, from ram-check to RAM-DONEHere is the inefficient code: [CODE] ;; ram-check L11DA: LD H,D ; Transfer the top value to the HL register LD L,E …

    ... black paper.
    DEC HL ; Decrement memory address.< ... SBC HL,DE ; subtract and add back setting
    ADD HL,DE ... ; carry when back at start.
    INC HL ...
    antoniovillena antoniovillena April 2012 Development
  • Optimize this: Distance CalculationBased on a taylor series expansion, suggested by NA_TH_AN, I've got this so far, which is far far faster than SQR(X^2+y^2) Formula is: in a right an…

    ... LD H,0

    ADD A,B

    LD ... LD B,A
    SBC HL,BC ; take half our smallest ... from HL

    SRL C ... Clear carry flag.
    SBC HL,BC

    SRL ... A ; Clear carry flag.
    ADD HL,BC


    Gedlion Gedlion April 2012 Development
  • CMWC random number generator for Z80Seeing the interest regarding the [URL="http://www.worldofspectrum.org/forums/showthread.php?t=23070"]Xor-Shift random number generator for Z80[/URL]…

    ... c,e
    ld hl,table
    add hl,bc

    ... ld c,(hl) ; y = q[i ... />
    ld c,d
    add hl,bc ; t = 253 * y + ...

    pop hl

    ld (hl),a ; q[i] = ...
    Patrik Rak Patrik Rak June 2012 Development
  • Jelly-Vision!As threatened in the "'Spectrum Play' Error" thread, here's a ruff'n'reddy interrupt driven full screen wobbling routine which has no practical use w…

    ... TESTSCROLL: push hl
    ld hl,0005
    add hl,sp
    ... ld a,(hl)
    ... bc
    INSCROLL: pop hl
    NOWOBBLE: pop af ...
    Battle Bunny Battle Bunny June 2012 Sinclair Basic
  • assembly optimization: times tenDecimal numbers are not computer friendly :) Anyway, short of saying "sod it - I'll multiply by 8" - and another part of the program does indeed div…

    ...
    Fastest way to do HL = HL x 10 ?

    ADD HL,HL
    ADD HL,HL
    ADD HL,HL
    ADD HL,DE
    ADD HL,DE
    ADD HL,HL
    LD E,L
    LD D,H
    ADD HL,HL
    ADD
    Gedlion Gedlion August 2012 Development
  • 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…

    ...
    ld hl,16384
    add hl,de
    ... d
    ld hl,uglifont
    add hl,de
    ret ... a
    ld hl,coordslookup
    add hl,de
    ...
    uglifruit uglifruit August 2012 Development
  • next pixelI searched the "Discussions" groups for the phrase "next pixel" and got no matches - and removing the quotes it discards the "next" and just searches…

    ... .

    [code]
    ld hl,$4000
    ld de,$4000 ... ,0

    pixrow: ld (hl),$ff
    inc d ;D ... c
    rrc c
    add hl,bc
    pop bc
    Battle Bunny Battle Bunny September 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…

    ... add hl,bc
    add hl,bc
    ld a,(hl)
    inc hl ...
    ld h,(hl ... br /> ex de,hl
    add hl,bc
    ex ...
    Shando Shando September 2012 Development
  • multi-scroll m/c subroutine for BASICArising from recent posts, here's a scrolling routine that will manage multiple left/right scrollings for any (sensible) line width or step; (ie. whe…

    Arising from recent posts, here's a scrolling routine that will manage multiple left/right scrollings for any (sensible) line width or step; (ie. where width is
    Battle Bunny Battle Bunny October 2012 Sinclair Basic
  • 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…

    ... (JP NC)
    exo_setbit:
    add hl, hl
    dec c
    jr ... /> ld h, (iy+104)
    add hl, bc ;Always clear C flag ... (JP NC)
    exo_setbit:
    add hl, hl
    dec c
    jr ...
    antoniovillena antoniovillena November 2012 Development
  • A quick newbish questionI'm reading through 'mastering machine code on your spectrum',as kindly posted by Mr bert on this forum. Correct me if I'm wrong from what i read,bu…

    ... assuming the register pairs like Hl hold 2 bytes or a ... where it mentions that the add instruction you have to use ... register with it ie ADD A,C,ADD A,D but not ... C.Or you can use ADD HL,but it must be used ... another pair ie DE.
    ADD Hl,DE together would still be ...
    bully bully March 2013 Development
  • Rotronics Wafadrive v.1.80 ROM - Corrupt or purposely broken?I've been digging around the Wafadrive v1.80 ROM (from [URL="http://zxspectrum.it.omegahg.com/_RO.htm"]here[/URL]) and can't decide if the ROM is cor…

    ...
    ;
    l_0d09: inc hl
    push hl
    ld (iy+$00 ... , l_0d2b ; hook-code-error
    add a, a
    push de ...
    ld hl, $009f
    ex (sp), hl
    push hl
    ld ... /> add hl, de
    ld e, (hl)
    inc hl
    ld h, (hl)
    jp jp July 2013 Hardware
<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
add 20.8K 30K
hl 6.2K 48K

Related Threads

  • what add-ons did.............what add-ons did people buy in the 80's for their zx spectrums? :)
  • Petition to persuade mobygames.com to add the SpectrumAs you may be aware, the excellent multi-format games documentation site [url="http://www.mobygames.com"]www.mobygames.com[/url] includes 36 differen…
  • The worst spectrum add on?I once had a light pen for my Spectrum that was really bad. I cannot remember what company made it. It was supposed to 'draw' by holding it directl…
  • Security Shelter by Add On ElectronicsHi,<br /> <br /> I have a copy of Security Shelter by Add on Electronics which I notice from the Archive is missing in action. <br /> <br /> I was a…
  • What was in the 'Shadow/Unicorn' add on box?'Shadow of The Unicorn'. What was actually contained in the add on box? Was it just extra memory?
  • CRASH called it "One of the best all-round music add-ons"!and from Sinclair User:<br /> <br /> "Its pedigree is interesting, too. The Music Machine has been developed by a group of ex-Sinclair employees - ca…
  • 3D Star Wars by ADD ON ELECTRONICS for SaleI have a copy of 3D Star Wars by Add On Electronics. As with all my other stuff, it was going on Ebay but I've been told that games from this compan…
  • 3D Star Wars by ADD ON ELECTRONICS for SaleI have a copy of 3D Star Wars by Add On Electronics. As with all my other stuff, it was going on Ebay but I've been told that games from this compan…
  • Add the numbers?Yesterday morning (about 1am) I was flicking through cable to see what was on, and I turned to ITV and that boring space filler "The Mint" was on. An…
  • Bonus materials add-ons?Very first impressions about Andrew's superb book are just started to come in and we are all very happy about it. We all also get a brief note includ…

Related Searches

  • ld hl de
  • how to add picture post
  • return to basic hl
  • shortest add 32
  • how to add 32
  • add video
  • add more ram to 48k spectrum
  • add game to sinclair infoseek
  • add machine code sprite movement to basic
  • add ix
  • add constant value to ix
  • call hl
  • add pictures to post
  • add music a g d
  • add ay music to a game
  • add z80 to start of tap file
  • add bas file to start of tap
  • add a letter
  • add adc hl a
  • add hl

Copyright © 2024 World of Spectrum