Created
May 24, 2020 20:02
-
-
Save ped7g/452b7272cb9e73de6b79871edb8f1ad9 to your computer and use it in GitHub Desktop.
sjasmplus version of ZX Spectrum Next dot command "ECHO"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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