1
0
mirror of https://github.com/cc65/cc65.git synced 2026-04-20 17:20:49 +00:00

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
+2
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
+2
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
+2
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
+2
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"
+2
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
+2
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
+2
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
+2
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
+2
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
+2
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
+2
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
+4
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)
+2
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
+2
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
+2
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
+3
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
+2
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
+2
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
+2
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
+2
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
+2
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
+3 -1
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
+2
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