added Word.asm

added wordcpy
cleaned up Byte.asm
renamed jobBuild to Build
This commit is contained in:
Stephen Toth 2018-06-27 13:22:20 -04:00
parent fa6bcd37da
commit 55cea9c4d6
3 changed files with 19 additions and 4 deletions

View File

@ -10,6 +10,6 @@ before_script:
- make install
- popd
jobBuild:
Build:
stage: build
script: ./build

View File

@ -20,9 +20,6 @@ bytecmp:
;; Inputs:
;; HL: Byte pointer
;; DE: Destination
;; Notes:
;; This will trample into undefined territory if you try to copy a string into some
;; allocated memory it won't fit in.
bytecpy:
push de
push hl

18
includes/Word.asm Normal file
View File

@ -0,0 +1,18 @@
;; wordcpy [Words]
;; Copies a word.
;; Inputs:
;; HL: word pointer
;; DE: Destination
wordcpy:
push de
push hl
ex de, hl
ld a, (de)
ld (hl), a
inc de
inc hl
ld a, (de)
ld (hl), a
pop hl
pop de
ret