mirror of
https://github.com/uffejakobsen/acme.git
synced 2024-11-29 04:49:20 +00:00
125d525b7d
git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@309 4df02467-bbd4-4a76-a152-e7ce94205b78
32 lines
663 B
Plaintext
32 lines
663 B
Plaintext
;ACME 0.97
|
|
|
|
; zp variables
|
|
!addr ptr = $fb
|
|
|
|
; kernal
|
|
!addr k_chrout = $ffd2
|
|
|
|
; print immediate - prints zero-terminated string located directly
|
|
; after calling JSR. returns to opcode following the terminator.
|
|
primm pla ; get low byte of return address - 1
|
|
tay ; into Y
|
|
pla ; get high byte of return address - 1
|
|
sta ptr + 1 ; to ptr high
|
|
lda #0 ; and zero ptr low, so "(ptr), y" points before text
|
|
sta ptr
|
|
beq @entry
|
|
;;;
|
|
--- jsr k_chrout
|
|
@entry iny
|
|
bne +
|
|
; fix high byte
|
|
inc ptr + 1
|
|
+ lda (ptr), y
|
|
bne ---
|
|
; push updated address onto stack
|
|
lda ptr + 1
|
|
pha
|
|
tya
|
|
pha
|
|
rts ; return to caller (after zero-terminated text)
|