Add comments to the cputs() and cputc() sources about the former relying on

the latter not to clobber ptr1.
This commit is contained in:
Kugel Fuhr
2025-07-04 11:20:35 +02:00
parent 29f7ab3809
commit 947eecb65c
23 changed files with 50 additions and 1 deletions

View File

@@ -5,6 +5,8 @@
; void __fastcall__ cputcxy (unsigned char x, unsigned char y, 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
.export _cputcxy, _cputc, newline, putchar,putchardirect

View File

@@ -4,6 +4,8 @@
; void __fastcall__ cputcxy (unsigned char x, unsigned char y, 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
.export _cputcxy, _cputc

View File

@@ -4,6 +4,8 @@
; void cputcxy (unsigned char x, unsigned char y, 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 plot, cputdirect, putchar

View File

@@ -5,6 +5,8 @@
; void cputcxy (unsigned char x, unsigned char y, 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"

View File

@@ -4,6 +4,8 @@
; void cputcxy (unsigned char x, unsigned char y, 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
.import gotox, gotoy, pusha0

View File

@@ -5,6 +5,8 @@
; void cputcxy (unsigned char x, unsigned char y, 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 setscrptr, cputdirect, putchar

View File

@@ -5,6 +5,8 @@
; void cputcxy (unsigned char x, unsigned char y, 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 newline, plot

View File

@@ -4,6 +4,8 @@
; void __fastcall__ cputcxy (unsigned char x, unsigned char y, 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 newline, plot

View File

@@ -4,6 +4,8 @@
; void __fastcall__ cputcxy (unsigned char x, unsigned char y, 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 newline, plot

View File

@@ -4,6 +4,8 @@
; void cputcxy (unsigned char x, unsigned char y, 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 newline, plot

View File

@@ -4,6 +4,8 @@
; void cputcxy (unsigned char x, unsigned char y, 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 newline, plot

View File

@@ -22,6 +22,10 @@ _cputsxy:
_cputs: sta ptr1 ; Save s
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:
.if .cap(CPU_HAS_ZPIND)
lda (ptr1) ; (5)

View File

@@ -5,6 +5,8 @@
; void cputcxy (unsigned char x, unsigned char y, 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 newline

View File

@@ -4,6 +4,8 @@
; void __fastcall__ cputcxy (unsigned char x, unsigned char y, 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 newline, plot

View File

@@ -2,6 +2,8 @@
; void cputcxy (unsigned char x, unsigned char y, 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 newline, plot

View File

@@ -21,6 +21,9 @@
; note that there are conflicts between control characters and keyboard:
; HOME = KEY_ENTER, KEY_HOME = REV_ON,
; 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
.import gotoxy, fixcursor

View File

@@ -4,6 +4,8 @@
; void __fastcall__ cputcxy (unsigned char x, unsigned char y, 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 newline, plot

View File

@@ -5,6 +5,8 @@
; void cputcxy (unsigned char x, unsigned char y, 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 newline

View File

@@ -2,6 +2,8 @@
; void cputcxy (unsigned char x, unsigned char y, 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 newline, plot

View File

@@ -4,6 +4,8 @@
; void cputcxy (unsigned char x, unsigned char y, 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 newline, plot

View File

@@ -4,6 +4,8 @@
; void cputcxy (unsigned char x, unsigned char y, 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 newline, plot

View File

@@ -1,8 +1,10 @@
; 2018-04-13, Jede (jede@oric.org)
;
;
; 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 CHARCOLOR, OLD_CHARCOLOR, BGCOLOR, OLD_BGCOLOR

View File

@@ -5,6 +5,8 @@
; void cputcxy (unsigned char x, unsigned char y, 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 newline, plot