ack/mach/6500/libem/print.s

28 lines
603 B
ArmAsm
Raw Normal View History

1984-12-17 11:03:13 +00:00
.define Mprint
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 prints a zero terminated ascii string.
! The registerpair AX contains the start of the string.
! The subroutine WRCH is a special routine on the BBC microcomputer
! which prints the character in A to the screen.
! The subroutine WRCH is a special one provided by the BBC
! microcomputer.
Mprint:
stx ADDR ! start address of string (lowbyte)
sta ADDR+1 ! start address of string (highbyte)
ldy #0
1: lda (ADDR),y ! get ascii character
beq 2f
jsr WRCH ! put it on the screen
iny
bne 1b
2: rts