2018-11-03 18:59:24 +00:00
|
|
|
*
|
|
|
|
*``````````````````````````````*
|
|
|
|
* 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 *
|
|
|
|
* *
|
2019-01-14 04:48:09 +00:00
|
|
|
* A = LOW BYTE OF ADDRESS *
|
|
|
|
* X = UNCHANGED *
|
|
|
|
* Y = LENGTH OF STRING *
|
2018-11-03 18:59:24 +00:00
|
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
|
|
*
|
|
|
|
DPRINT
|
|
|
|
*
|
|
|
|
** SAVE RETURN ADDRESS
|
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
PLA
|
|
|
|
STA RETADR
|
|
|
|
PLA
|
|
|
|
STA RETADR+1
|
2018-11-03 18:59:24 +00:00
|
|
|
*
|
|
|
|
** GET ADDRESS, STORE IN ZERO PAGE
|
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
PLA
|
|
|
|
STA ADDR1
|
|
|
|
PLA
|
|
|
|
STA ADDR1+1
|
2018-11-03 18:59:24 +00:00
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
LDY #$00
|
2018-11-03 18:59:24 +00:00
|
|
|
:LOOP
|
2019-01-14 04:48:09 +00:00
|
|
|
LDA (ADDR1),Y
|
|
|
|
BEQ :EXIT
|
|
|
|
JSR COUT1
|
|
|
|
INY
|
|
|
|
BNE :LOOP
|
2018-11-03 18:59:24 +00:00
|
|
|
:EXIT
|
|
|
|
*
|
|
|
|
** RESTORE RETURN ADDRESS
|
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
LDA RETADR+1
|
|
|
|
PHA
|
|
|
|
LDA RETADR
|
|
|
|
PHA
|
2018-11-03 18:59:24 +00:00
|
|
|
*
|
2019-01-14 04:48:09 +00:00
|
|
|
RTS
|