mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-26 08:38:06 +11:00
Compare commits
No commits in common. "8926c33ab105f0ae9a7ad0c4c14afaf3dd0c0c07" and "e259e3d02eafd0ed4b4a172a97881a2243d37d4d" have entirely different histories.
8926c33ab1
...
e259e3d02e
@ -27,29 +27,34 @@ addDE:
|
|||||||
noop: ; piggy backing on the first "ret" we have
|
noop: ; piggy backing on the first "ret" we have
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; copy (HL) into DE, then exchange the two, utilising the optimised HL instructions.
|
; copy (DE) into DE, little endian style (addresses in z80 are always have
|
||||||
; ld must be done little endian, so least significant byte first.
|
; their LSB before their MSB)
|
||||||
intoHL:
|
intoDE:
|
||||||
push de
|
push af
|
||||||
ld e, (hl)
|
ld a, (de)
|
||||||
inc hl
|
inc de
|
||||||
ld d, (hl)
|
ex af, af'
|
||||||
ex de, hl
|
ld a, (de)
|
||||||
pop de
|
ld d, a
|
||||||
|
ex af, af'
|
||||||
|
ld e, a
|
||||||
|
pop af
|
||||||
ret
|
ret
|
||||||
|
|
||||||
intoDE:
|
intoHL:
|
||||||
ex de, hl
|
push de
|
||||||
call intoHL
|
ex de, hl
|
||||||
ex de, hl ; de preserved by intoHL, so no push/pop needed
|
call intoDE
|
||||||
|
ex de, hl
|
||||||
|
pop de
|
||||||
ret
|
ret
|
||||||
|
|
||||||
intoIX:
|
intoIX:
|
||||||
push ix
|
push de
|
||||||
ex (sp), hl ;swap hl with ix, on the stack
|
push ix \ pop de
|
||||||
call intoHL
|
call intoDE
|
||||||
ex (sp), hl ;restore hl from stack
|
push de \ pop ix
|
||||||
pop ix
|
pop de
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; add the value of A into HL
|
; add the value of A into HL
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
|
|
||||||
# readlink -f doesn't work with macOS's implementation
|
|
||||||
# so, if we can't get readlink -f to work, try python with a realpath implementation
|
|
||||||
ABS_PATH=$(readlink -f "$0" || python -c "import sys, os; print(os.path.realpath('$0'))")
|
|
||||||
|
|
||||||
# wrapper around ./emul/zasm/zasm that prepares includes CFS prior to call
|
# wrapper around ./emul/zasm/zasm that prepares includes CFS prior to call
|
||||||
DIR=$(dirname "${ABS_PATH}")
|
DIR=$(dirname $(readlink -f "$0"))
|
||||||
ZASMBIN="${DIR}/emul/zasm/zasm"
|
ZASMBIN="${DIR}/emul/zasm/zasm"
|
||||||
CFSPACK="${DIR}/cfspack/cfspack"
|
CFSPACK="${DIR}/cfspack/cfspack"
|
||||||
INCCFS=$(mktemp)
|
INCCFS=$(mktemp)
|
||||||
|
Loading…
Reference in New Issue
Block a user