Skip to content

Instantly share code, notes, and snippets.

@ped7g
Created May 24, 2020 20:02
Show Gist options
  • Save ped7g/452b7272cb9e73de6b79871edb8f1ad9 to your computer and use it in GitHub Desktop.
Save ped7g/452b7272cb9e73de6b79871edb8f1ad9 to your computer and use it in GitHub Desktop.
sjasmplus version of ZX Spectrum Next dot command "ECHO"
OUTPUT "ECHO"
ORG 8192
Start: ex de,hl
ld a,d
or e
ret z ; DE == 0, no pointer to arguments
Print: ld a,(de)
or a
ret z ; zero byte end of command line
cp 13
ret z ; "enter" ending command line
cp ':'
ret z ; ":" ending command line
inc de ; move pointer to next character
rst 16 ; print current character in register A
jr Print ; loop until command line ends
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment