Add comments to the cputs() and cputc() sources about the former relying on
the latter not to clobber ptr1.
This commit is contained in:
@@ -5,6 +5,8 @@
|
|||||||
; void __fastcall__ cputcxy (unsigned char x, unsigned char y, char c);
|
; void __fastcall__ cputcxy (unsigned char x, unsigned char y, char c);
|
||||||
; void __fastcall__ cputc (char c);
|
; void __fastcall__ cputc (char c);
|
||||||
;
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.import COUT
|
.import COUT
|
||||||
.export _cputcxy, _cputc, newline, putchar,putchardirect
|
.export _cputcxy, _cputc, newline, putchar,putchardirect
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
; void __fastcall__ cputcxy (unsigned char x, unsigned char y, char c);
|
; void __fastcall__ cputcxy (unsigned char x, unsigned char y, char c);
|
||||||
; void __fastcall__ cputc (char c);
|
; void __fastcall__ cputc (char c);
|
||||||
;
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.constructor initconio
|
.constructor initconio
|
||||||
.export _cputcxy, _cputc
|
.export _cputcxy, _cputc
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
; void cputcxy (unsigned char x, unsigned char y, char c);
|
; void cputcxy (unsigned char x, unsigned char y, char c);
|
||||||
; void cputc (char c);
|
; void cputc (char c);
|
||||||
;
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.export _cputcxy, _cputc
|
.export _cputcxy, _cputc
|
||||||
.export plot, cputdirect, putchar
|
.export plot, cputdirect, putchar
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
; void cputcxy (unsigned char x, unsigned char y, char c);
|
; void cputcxy (unsigned char x, unsigned char y, char c);
|
||||||
; void cputc (char c);
|
; void cputc (char c);
|
||||||
;
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.include "atari5200.inc"
|
.include "atari5200.inc"
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
; void cputcxy (unsigned char x, unsigned char y, char c);
|
; void cputcxy (unsigned char x, unsigned char y, char c);
|
||||||
; void cputc (char c);
|
; void cputc (char c);
|
||||||
;
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.export _cputc
|
.export _cputc
|
||||||
.import gotox, gotoy, pusha0
|
.import gotox, gotoy, pusha0
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
; void cputcxy (unsigned char x, unsigned char y, char c);
|
; void cputcxy (unsigned char x, unsigned char y, char c);
|
||||||
; void cputc (char c);
|
; void cputc (char c);
|
||||||
;
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.export _cputcxy, _cputc
|
.export _cputcxy, _cputc
|
||||||
.export setscrptr, cputdirect, putchar
|
.export setscrptr, cputdirect, putchar
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
; void cputcxy (unsigned char x, unsigned char y, char c);
|
; void cputcxy (unsigned char x, unsigned char y, char c);
|
||||||
; void cputc (char c);
|
; void cputc (char c);
|
||||||
;
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.export _cputcxy, _cputc, cputdirect, putchar
|
.export _cputcxy, _cputc, cputdirect, putchar
|
||||||
.export newline, plot
|
.export newline, plot
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
; void __fastcall__ cputcxy (unsigned char x, unsigned char y, char c);
|
; void __fastcall__ cputcxy (unsigned char x, unsigned char y, char c);
|
||||||
; void __fastcall__ cputc (char c);
|
; void __fastcall__ cputc (char c);
|
||||||
;
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.export _cputcxy, _cputc, cputdirect, putchar
|
.export _cputcxy, _cputc, cputdirect, putchar
|
||||||
.export newline, plot
|
.export newline, plot
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
; void __fastcall__ cputcxy (unsigned char x, unsigned char y, char c);
|
; void __fastcall__ cputcxy (unsigned char x, unsigned char y, char c);
|
||||||
; void __fastcall__ cputc (char c);
|
; void __fastcall__ cputc (char c);
|
||||||
;
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.export _cputcxy, _cputc, cputdirect, putchar
|
.export _cputcxy, _cputc, cputdirect, putchar
|
||||||
.export newline, plot
|
.export newline, plot
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
; void cputcxy (unsigned char x, unsigned char y, char c);
|
; void cputcxy (unsigned char x, unsigned char y, char c);
|
||||||
; void cputc (char c);
|
; void cputc (char c);
|
||||||
;
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.export _cputcxy, _cputc, cputdirect, putchar
|
.export _cputcxy, _cputc, cputdirect, putchar
|
||||||
.export newline, plot
|
.export newline, plot
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
; void cputcxy (unsigned char x, unsigned char y, char c);
|
; void cputcxy (unsigned char x, unsigned char y, char c);
|
||||||
; void cputc (char c);
|
; void cputc (char c);
|
||||||
;
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.export _cputcxy, _cputc, cputdirect, putchar
|
.export _cputcxy, _cputc, cputdirect, putchar
|
||||||
.export newline, plot
|
.export newline, plot
|
||||||
|
|||||||
@@ -22,6 +22,10 @@ _cputsxy:
|
|||||||
_cputs: sta ptr1 ; Save s
|
_cputs: sta ptr1 ; Save s
|
||||||
stx ptr1+1
|
stx ptr1+1
|
||||||
|
|
||||||
|
; Important note: The implementation below relies on the _cputc() function not
|
||||||
|
; clobbering ptr1. This might not be the case when rewriting this function so
|
||||||
|
; beware!
|
||||||
|
|
||||||
L0:
|
L0:
|
||||||
.if .cap(CPU_HAS_ZPIND)
|
.if .cap(CPU_HAS_ZPIND)
|
||||||
lda (ptr1) ; (5)
|
lda (ptr1) ; (5)
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
; void cputcxy (unsigned char x, unsigned char y, char c);
|
; void cputcxy (unsigned char x, unsigned char y, char c);
|
||||||
; void cputc (char c);
|
; void cputc (char c);
|
||||||
;
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.export _cputcxy, _cputc, cputdirect, putchar
|
.export _cputcxy, _cputc, cputdirect, putchar
|
||||||
.export newline
|
.export newline
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
; void __fastcall__ cputcxy (unsigned char x, unsigned char y, char c);
|
; void __fastcall__ cputcxy (unsigned char x, unsigned char y, char c);
|
||||||
; void __fastcall__ cputc (char c);
|
; void __fastcall__ cputc (char c);
|
||||||
;
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.export _cputcxy, _cputc, cputdirect, putchar
|
.export _cputcxy, _cputc, cputdirect, putchar
|
||||||
.export newline, plot
|
.export newline, plot
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
; void cputcxy (unsigned char x, unsigned char y, char c);
|
; void cputcxy (unsigned char x, unsigned char y, char c);
|
||||||
; void cputc (char c);
|
; void cputc (char c);
|
||||||
;
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.export _cputcxy, _cputc, cputdirect, putchar
|
.export _cputcxy, _cputc, cputdirect, putchar
|
||||||
.export newline, plot
|
.export newline, plot
|
||||||
|
|||||||
@@ -21,6 +21,9 @@
|
|||||||
; note that there are conflicts between control characters and keyboard:
|
; note that there are conflicts between control characters and keyboard:
|
||||||
; HOME = KEY_ENTER, KEY_HOME = REV_ON,
|
; HOME = KEY_ENTER, KEY_HOME = REV_ON,
|
||||||
; UPLINE = ?, KEY_UPARROW = GOTOY, ...
|
; UPLINE = ?, KEY_UPARROW = GOTOY, ...
|
||||||
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.export _cputcxy, _cputc
|
.export _cputcxy, _cputc
|
||||||
.import gotoxy, fixcursor
|
.import gotoxy, fixcursor
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
; void __fastcall__ cputcxy (unsigned char x, unsigned char y, char c);
|
; void __fastcall__ cputcxy (unsigned char x, unsigned char y, char c);
|
||||||
; void __fastcall__ cputc (char c);
|
; void __fastcall__ cputc (char c);
|
||||||
;
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.export _cputcxy, _cputc, cputdirect, putchar
|
.export _cputcxy, _cputc, cputdirect, putchar
|
||||||
.export newline, plot
|
.export newline, plot
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
; void cputcxy (unsigned char x, unsigned char y, char c);
|
; void cputcxy (unsigned char x, unsigned char y, char c);
|
||||||
; void cputc (char c);
|
; void cputc (char c);
|
||||||
;
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.export _cputcxy, _cputc, cputdirect, putchar
|
.export _cputcxy, _cputc, cputdirect, putchar
|
||||||
.export newline
|
.export newline
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
; void cputcxy (unsigned char x, unsigned char y, char c);
|
; void cputcxy (unsigned char x, unsigned char y, char c);
|
||||||
; void cputc (char c);
|
; void cputc (char c);
|
||||||
;
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.export _cputcxy, _cputc, cputdirect, putchar
|
.export _cputcxy, _cputc, cputdirect, putchar
|
||||||
.export newline, plot
|
.export newline, plot
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
; void cputcxy (unsigned char x, unsigned char y, char c);
|
; void cputcxy (unsigned char x, unsigned char y, char c);
|
||||||
; void cputc (char c);
|
; void cputc (char c);
|
||||||
;
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.export _cputcxy, _cputc, cputdirect, putchar
|
.export _cputcxy, _cputc, cputdirect, putchar
|
||||||
.export newline, plot
|
.export newline, plot
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
; void cputcxy (unsigned char x, unsigned char y, char c);
|
; void cputcxy (unsigned char x, unsigned char y, char c);
|
||||||
; void cputc (char c);
|
; void cputc (char c);
|
||||||
;
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.export _cputcxy, _cputc, cputdirect, putchar
|
.export _cputcxy, _cputc, cputdirect, putchar
|
||||||
.export newline, plot
|
.export newline, plot
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
; 2018-04-13, Jede (jede@oric.org)
|
; 2018-04-13, Jede (jede@oric.org)
|
||||||
;
|
;
|
||||||
|
;
|
||||||
; void cputc (char c);
|
; void cputc (char c);
|
||||||
;
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.export _cputc, _cputcxy, cputdirect, display_conio
|
.export _cputc, _cputcxy, cputdirect, display_conio
|
||||||
.export CHARCOLOR, OLD_CHARCOLOR, BGCOLOR, OLD_BGCOLOR
|
.export CHARCOLOR, OLD_CHARCOLOR, BGCOLOR, OLD_BGCOLOR
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
; void cputcxy (unsigned char x, unsigned char y, char c);
|
; void cputcxy (unsigned char x, unsigned char y, char c);
|
||||||
; void cputc (char c);
|
; void cputc (char c);
|
||||||
;
|
;
|
||||||
|
; Important note: The implementation of cputs() relies on the cputc() function
|
||||||
|
; not clobbering ptr1. Beware when rewriting or changing this function!
|
||||||
|
|
||||||
.export _cputcxy, _cputc, cputdirect, putchar
|
.export _cputcxy, _cputc, cputdirect, putchar
|
||||||
.export newline, plot
|
.export newline, plot
|
||||||
|
|||||||
Reference in New Issue
Block a user