ack/mach/6500/libem/zer.s

26 lines
302 B
ArmAsm
Raw Normal View History

1984-12-17 11:03:13 +00:00
.define Zer
1987-01-30 18:41:42 +00:00
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
1984-12-17 11:03:13 +00:00
! This subroutine puts n (n <=256) zero bytes on top of
! the stack.
! The number of bytes minus one is in Y.
Zer:
tya
lsr a ! number of bytes div 2
tay
iny
lda #0
tax
2: jsr Push ! push two bytes
dey
bne 2b
rts