AppleIIAsm-Collection/source/disk1_stdio/T.SUB.XPRINT
nathanriggs c8cac53c5e Rev 0.4 updates
Massive updates that changes the way most subroutines are handled. Major bugfixes, various utilities added, started higher-level libraries.
2019-04-26 18:49:10 -04:00

67 lines
1.7 KiB
Plaintext

*
*``````````````````````````````*
* XPRINT :: SPECIAL PRINT *
*- -*
* PRINTS DATA IMMEDIATELY *
*- -*
* CLOBBERS: *
* *
* FLAGS: NZC----- REG: AYM- *
*- -*
* CYCLES: 53+ *
* SIZE: *
*- -*
* USAGE: *
* JSR SPRINT *
* ASC "HELLO, WORLD!" *
*- -*
* ENTRY *
* *
* TOP OF STACK *
* *
* LOW BYTE OF RETURN ADDRESS *
* HI BYTE OF RETURN ADDRESS *
*- -*
* EXIT *
* *
* TOP OF STACK *
* *
* LOW BYTE OF RETURN ADDRESS *
* HI BYTE OF RETURN ADDRESS *
* *
* Y = LOW BYTE OF ADDRESS *
* X = UNCHANGED *
* A = LO BYTE *
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
*
XPRINT
*
** GET CURRENT EXEC ADDRESS
*
PLA
STA ADDR1
PLA
STA ADDR1+1
*
LDY #$01 ; POINT TO NEXT
; INSTRUCTION
:LOOP
LDA (ADDR1),Y
BEQ :DONE
JSR COUT1
INY
BNE :LOOP
:DONE ; RESTORE STACK
CLC ; EXEC POINTER
TYA ; TO RESUME
ADC ADDR1
STA ADDR1
LDA ADDR1+1
ADC #$00
PHA
LDA ADDR1
PHA
RTS
:EXIT
*