mirror of
https://github.com/nathanriggs/AppleIIAsm-Collection.git
synced 2024-11-30 15:49:55 +00:00
03636aa196
- various bugfixes - integrated required library - created minified sources - made macros slightly more flexible
82 lines
2.0 KiB
Plaintext
82 lines
2.0 KiB
Plaintext
*
|
|
*``````````````````````````````*
|
|
* FPRINT : JUST PRINTS TO COUT *
|
|
*- -*
|
|
* PRINTS A STRING TO A TEXT *
|
|
* FILE THAT IS SPECIFIED IN AN *
|
|
* ASC THAT FOLLOWS THE JSR TO *
|
|
* THE SUBROUTINE. *
|
|
*- -*
|
|
* CLOBBERS: *
|
|
* *
|
|
* FLAGS: ????---- REG: AXYM *
|
|
*- -*
|
|
* CYCLES: ??? *
|
|
* SIZE: *
|
|
*- -*
|
|
* USAGE: *
|
|
* *
|
|
* JSR CMD *
|
|
* ASC "OPEN TEXT1" *
|
|
* HEX 8D00 *
|
|
* JSR CMD *
|
|
* ASC "WRITE TEXT1" *
|
|
* HEX 8D00 *
|
|
* JSR FPRINT *
|
|
* ASC "THIS IS A TEST." *
|
|
* HEX 8D00 *
|
|
* JSR CMD *
|
|
* ASC "CLOSE TEXT1" *
|
|
* HEX 8D00 *
|
|
*- -*
|
|
* 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 = CLOBBERED *
|
|
* .X = UNCHANGED *
|
|
* .A = CLOBBERED *
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
*
|
|
FPRINT
|
|
*
|
|
** GET RETURN ADDRESS
|
|
*
|
|
PLA
|
|
STA RETADR
|
|
PLA
|
|
STA RETADR+1
|
|
*
|
|
** NOW SEND STRING TO COUT
|
|
*
|
|
LDY #$01 ; POINT TO NEXT INSTR
|
|
:LP
|
|
LDA (RETADR),Y
|
|
BEQ :DONE
|
|
JSR FCOUT
|
|
INY
|
|
BNE :LP
|
|
:DONE
|
|
CLC ; RESTORE INSTR POINTER
|
|
TYA
|
|
ADC RETADR
|
|
STA RETADR
|
|
LDA RETADR+1
|
|
ADC #$00
|
|
PHA
|
|
LDA RETADR
|
|
PHA
|
|
*
|
|
RTS
|
|
*
|