Improved lowercase support for future versions

This commit is contained in:
Zane Kaminski 2020-09-06 14:13:24 -04:00
parent 8a90077d1e
commit ff31b44109
4 changed files with 16 additions and 3 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +1,6 @@
; ;
; Ullrich von Bassewitz, 06.08.1998 ; Ullrich von Bassewitz, 06.08.1998
; Modified Sep. 5, 2020 by Zane Kaminski, Engineer @ Garrett's Workshop ; Modified Sep. 6, 2020 by Zane Kaminski, Engineer @ Garrett's Workshop
; ;
; ;
.ifdef __APPLE2ENH__ .ifdef __APPLE2ENH__
@ -8,6 +8,7 @@
.endif .endif
.export _gwcputcxy, _gwcputc .export _gwcputcxy, _gwcputc
.export _gwcputsxy, _gwcputs .export _gwcputsxy, _gwcputs
.import _gwconiomask
.import gotoxy, VTABZ .import gotoxy, VTABZ
.importzp ptr1, tmp1 .importzp ptr1, tmp1
@ -60,6 +61,12 @@ _gwcputc:
cmp #$0A ; Test for \n = line feed cmp #$0A ; Test for \n = line feed
beq newline beq newline
eor #$80 ; Invert high bit eor #$80 ; Invert high bit
; .ifndef __APPLE2ENH__
cmp #$E0 ; Test for lowercase
bcc cputdirect
; and #$DF ; Convert to uppercase
and _gwconiomask ; Convert to uppercase using mask
; .endif
cputdirect: cputdirect:
jsr putchar jsr putchar

10
main.c
View File

@ -4,9 +4,14 @@
#include "ram2e.h" #include "ram2e.h"
#include "ram2gs.h" #include "ram2gs.h"
#include "gwconio.h"
char gwconiomask;
int main(void) int main(void)
{ {
gwconiomask = 0xFF;
// First clear screen // First clear screen
clrscr(); clrscr();
@ -22,9 +27,10 @@ int main(void)
ram2gs_main(); ram2gs_main();
return EXIT_SUCCESS; return EXIT_SUCCESS;
default: default:
gwconiomask = 0xDF;
// If not on IIe or IIgs, show an error message and quit // If not on IIe or IIgs, show an error message and quit
cputsxy(0, 8, " THIS PROGRAM REQUIRES APPLE IIE OR IIGS"); gwcputsxy(0, 8, " THIS PROGRAM REQUIRES APPLE IIE OR IIGS");
cputsxy(0, 10, " PRESS ANY KEY TO QUIT."); gwcputsxy(0, 10, " PRESS ANY KEY TO QUIT.");
cgetc(); // Wait for key cgetc(); // Wait for key
clrscr(); // Clear screen before quitting clrscr(); // Clear screen before quitting
return EXIT_SUCCESS; return EXIT_SUCCESS;