mirror of
https://github.com/nathanriggs/AppleIIAsm-Collection.git
synced 2024-12-03 18:49:28 +00:00
875dd80998
- fixed a bunch of bugs - separated common and stdio libraries - commenting upgrades - created min versions of each library
104 lines
3.3 KiB
Plaintext
104 lines
3.3 KiB
Plaintext
*
|
|
*``````````````````````````````*
|
|
* TVLIN :: TEXT VERTICAL LINE *
|
|
*- -*
|
|
* CREATES A VERTICAL LINE OF *
|
|
* TEXT COMPOSED OF THE FILL *
|
|
* CHARACTER SPECIFIED AT X. *
|
|
*- -*
|
|
* CLOBBERS: *
|
|
* *
|
|
* FLAGS: ????---- REG: AXYM *
|
|
*- -*
|
|
* CYCLES: ??? *
|
|
* SIZE: *
|
|
*- -*
|
|
* USAGE: *
|
|
* LDA (Y-START) *
|
|
* PHA *
|
|
* LDA (Y-END) *
|
|
* PHA *
|
|
* LDA (X-POS) *
|
|
* PHA *
|
|
* LDA (FILL CHAR) *
|
|
* PHA *
|
|
* JSR TVLIN *
|
|
*- -*
|
|
* ENTRY *
|
|
* *
|
|
* TOP OF STACK *
|
|
* *
|
|
* LOW BYTE OF RETURN ADDRESS *
|
|
* HI BYTE OF RETURN ADDRESS *
|
|
* XPOS START OF LINE (:Y1) *
|
|
* XPOS END OF LINE (:Y2) *
|
|
* YPOS OF LINE (:X) *
|
|
* FILL CHARACTER (:F) *
|
|
*- -*
|
|
* EXIT *
|
|
* *
|
|
* TOP OF STACK *
|
|
* *
|
|
* LOW BYTE OF RETURN ADDRESS *
|
|
* HI BYTE OF RETURN ADDRESS *
|
|
* *
|
|
* Y = END OF LINE *
|
|
* X = HORIZONTAL POSITION *
|
|
* A = LOW BYTE OF RET ADDR *
|
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
|
*
|
|
TVLIN
|
|
*
|
|
** SAVE RETURN ADDRESS
|
|
*
|
|
PLA
|
|
STA :RETADR
|
|
PLA
|
|
STA :RETADR+1
|
|
*
|
|
** GET PARAMETERS
|
|
*
|
|
PLA
|
|
STA :F ; FILL CHAR
|
|
PLA
|
|
STA :X ; X POS
|
|
PLA
|
|
STA :Y2 ; END
|
|
PLA
|
|
STA :Y1 ; START
|
|
*
|
|
LDX :X
|
|
LDY :Y1
|
|
STY CURSV
|
|
STX CURSH
|
|
JSR VTAB ; SET CURSOR POS
|
|
:LOOP
|
|
JSR COUT1 ; PRINT CHAR
|
|
LDX :X
|
|
STX CURSH
|
|
STY CURSV
|
|
JSR VTAB ; SET NEW CURSOR POS
|
|
LDA :F ; RELOAD FILL CHAR
|
|
INY ; INCREASE COUNTER
|
|
CPY :Y2 ; IF Y1 < Y2
|
|
BNE :LOOP ; LOOP; ELSE, CONTINUE
|
|
:EXIT
|
|
*
|
|
** RESTORE RETURN ADDRESS
|
|
*
|
|
LDA :RETADR+1
|
|
PHA
|
|
LDA :RETADR
|
|
PHA
|
|
*
|
|
RTS
|
|
*
|
|
** DATA
|
|
*
|
|
:RETADR DS 2
|
|
:X DS 1
|
|
:Y1 DS 1
|
|
:Y2 DS 1
|
|
:F DS 1
|
|
|