*
*``````````````````````````````*
* TXTPUT : PUT CHAR AT X,Y POS *
*                              *
* SIMPLY PLOTS A CHARACTER AT  *
* GIVEN X,Y DIRECTLY TO MEMORY *
*-                            -*
* CLOBBERS:                    *
*                              *
* FLAGS:  ???-----  REG: A-YM  *
*-                            -*
* CYCLES: ???                  *
* SIZE:                        *
*-                            -*
* USAGE:                       *
*        LDA #10 ; XPOS        *
*        PHA                   *
*        LDA #5 ; YPOS         *
*        PHA                   *
*        LDA #AA ; FILL CHAR   *
*        PHA                   *
*        JSR TXTPUT            *
*-                            -*
* ENTRY                        *
*                              *
* TOP OF STACK                 *
*                              *
* LOW BYTE OF RETURN ADDRESS   *
* HI BYTE OF RETURN ADDRESS    *
* FILL CHARACTER               *
* Y POSITION                   *
* X POSITION                   *
*-                            -*
* EXIT                         *
*                              *
* TOP OF STACK                 *
*                              *
* LOW BYTE OF RETURN ADDRESS   *
* HI BYTE OF RETURN ADDRESS    *
*                              *
*  A = TRASH                   *
*  X = TRASH                   *
*  Y = TRASH                   *
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
*
TXTPUT
*
** GET RETURN ADDRESS
*
         PLA
         STA   RETADR
         PLA
         STA   RETADR+1
*
** GET VARIABLES
*
         PLA
         STA   :F         ; FILL
         PLA
         STA   :Y
         PLA
         STA   :X
*
********************************
*
** ERROR CONTROL
*
********************************
*
         LDA   ERRCTRL
         CMP   #1
         BEQ   :CHKERR
         JMP   :ERREND
:CHKERR
         LDA   :X
         CMP   #40         ; MAX COL + 1
         BCS   :XOVF
         LDA   :Y
         CMP   #24
         BCS   :YOVF
         JMP   :ERREND
:XOVF
         _ERR  #:E_SID;#:E_XOF;#:E_DMP1;#:F;#3
         JMP   :ERREND
:YOVF
         _ERR  #:E_SID;#:E_YOF;#:E_DMP1;#:F;#3
*
********************************
*
:ERREND
*
********************************
*
*
         LDA   :Y
         LDY   :X
         JSR   $F847
         LDA   :F
         STA   ($26),Y
*
**
*
         LDA   RETADR+1
         PHA
         LDA   RETADR
         PHA
         RTS
*
** DATA
*
:F       DS    1
:Y       DS    1
:X       DS    1
*
:E_SID   ASC   "TXTPUT (TPUT MACRO)",00
:E_DMP1  ASC   "DUMPING F(1) Y(1) X(1):",00
:E_XOF   ASC   "X OVERFLOW. X <> MIN/MAX",00
:E_YOF   ASC   "Y OVERFLOW. Y <> MIN/MAX",00
*
