mirror of
https://github.com/nathanriggs/AppleIIAsm-Collection.git
synced 2024-11-27 12:49:27 +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
83 lines
2.3 KiB
Plaintext
83 lines
2.3 KiB
Plaintext
*
|
|
*``````````````````````````````*
|
|
* DPRINT :: PRINT FROM MEMORY *
|
|
*- -*
|
|
* PRINTS DATA FROM SPECIFIED *
|
|
* MEMORY LOCATION UNTIL *
|
|
* REACHING 00 (STRING TERM). *
|
|
*- -*
|
|
* CLOBBERS: *
|
|
* *
|
|
* FLAGS: -------- REG: A-YM *
|
|
*- -*
|
|
* CYCLES: 25+ *
|
|
* SIZE: *
|
|
*- -*
|
|
* USAGE: *
|
|
* LDA #>(ADDRESS) *
|
|
* PHA *
|
|
* LDA #<(ADDRESS) *
|
|
* PHA *
|
|
* JSR DPRINT *
|
|
*- -*
|
|
* ENTRY *
|
|
* *
|
|
* TOP OF STACK *
|
|
* *
|
|
* LOW BYTE OF RETURN ADDRESS *
|
|
* HI BYTE OF RETURN ADDRESS *
|
|
* LOW BYTE OF PRINT ADDRESS *
|
|
* HI BYTE OF PRINT ADDRESS *
|
|
*- -*
|
|
* EXIT *
|
|
* *
|
|
* TOP OF STACK *
|
|
* *
|
|
* LOW BYTE OF RETURN ADDRESS *
|
|
* HI BYTE OF RETURN ADDRESS *
|
|
* *
|
|
* A = LOW BYTE OF ADDRESS *
|
|
* X = UNCHANGED *
|
|
* Y = LENGTH OF PRINTED *
|
|
* STRING *
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
*
|
|
DPRINT
|
|
*
|
|
** SAVE RETURN ADDRESS
|
|
*
|
|
PLA
|
|
STA :RETADR
|
|
PLA
|
|
STA :RETADR+1
|
|
*
|
|
** GET ADDRESS, STORE IN ZERO PAGE
|
|
*
|
|
PLA
|
|
STA ADDR1
|
|
PLA
|
|
STA ADDR1+1
|
|
*
|
|
LDY #$00
|
|
:LOOP
|
|
LDA (ADDR1),Y
|
|
BEQ :EXIT
|
|
JSR COUT1
|
|
INY
|
|
BNE :LOOP
|
|
:EXIT
|
|
*
|
|
** RESTORE RETURN ADDRESS
|
|
*
|
|
LDA :RETADR+1
|
|
PHA
|
|
LDA :RETADR
|
|
PHA
|
|
*
|
|
RTS
|
|
*
|
|
** DATA
|
|
*
|
|
:RETADR DS 2
|
|
*
|