repo.or.cz
/
urasm.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
UrForth: MTASK fixes; removed C debugger (it was broken a long time ago anyway; new...
[urasm.git]
/
samples
/
macro
/
downxx.zas
blob
6347d867c647a6ec61ae506b8fbdd9875b9838a1
1
;deffmt none
2
3
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4
;; IN:
5
;; HL: scraddr
6
;; OUT:
7
;; HL: scraddrnext -- next y line
8
;; AF: dead
9
MACRO downxx regpair, asret=0, asjp=0
10
;IF !isid(=regpair)
11
; FATAL "downxx: regpair expected"
12
;ENDIF
13
;
14
inc =regpair[0]
15
ld a,=regpair[0]
16
and #07
17
IF =asret
18
ret nz
19
ELSEIF =asjp
20
jp nz,..done
21
ELSE
22
jr nz,..done
23
ENDIF
24
ld a,=regpair[1]
25
add a,32
26
ld =regpair[1],a
27
IF =asret
28
ret c
29
ELSEIF =asjp
30
jp c,..done
31
ELSE
32
jr c,..done
33
ENDIF
34
ld a,=regpair[0]
35
sub 8
36
ld =regpair[0],a
37
IF =asret
38
ret
39
ELSE
40
..done:
41
ENDIF
42
ENDM
43
44
45
downxx de
46
nop
47
downxx hl,1
48
nop
49
downxx bc,,1
50
nop