mirror of
https://github.com/nathanriggs/AppleIIAsm-Collection.git
synced 2024-12-12 01:30:00 +00:00
9849dbb5ea
items in disk folder will be updated automatically, whereas items in the source folder will be updated periodically due to having to manually sort through files to copy and paste
71 lines
2.3 KiB
Plaintext
71 lines
2.3 KiB
Plaintext
*
|
|
*``````````````````````````````*
|
|
* XPRINT :: SPECIAL PRINT *
|
|
*- -*
|
|
* PRINTS DATA IMMEDIATELY *
|
|
* FOLLOWING THE JSR TO SPRINT *
|
|
*- -*
|
|
* 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 *
|
|
* *
|
|
* A,Y = LOW BYTE OF ADDRESS *
|
|
* X = UNCHANGED *
|
|
*- -*
|
|
* NOTE: PARTIALLY ADOPTED FROM *
|
|
* ROGER WAGNER'S AND CHRIS *
|
|
* TORRENCE'S /ASSEMBLY LINES/ *
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
*
|
|
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
|
|
*
|