Some backspace support for a2e

This commit is contained in:
Luxferre
2022-08-16 16:49:50 +03:00
parent 1f05ca0e90
commit df01a57c03
2 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ CFILES=equi.c
PBTDIR=platform-build-tools
PERSFILE=PERS.DAT
# Apple IIe target configuration
A2FLAGS=-DSTACK_SIZE=256 -DLIT_STACK_SIZE=32 -DGPD_AREA_SIZE=1024 -DCMD_BUF_SIZE=13500 -DCLT_ENTRIES_MAX=256 -DEQUI_TASKS_MAX=4
A2FLAGS=-DSTACK_SIZE=256 -DLIT_STACK_SIZE=32 -DGPD_AREA_SIZE=1024 -DCMD_BUF_SIZE=13400 -DCLT_ENTRIES_MAX=256 -DEQUI_TASKS_MAX=4
# POSIX desktop target configuration
PDFLAGS=-DSTACK_SIZE=256 -DLIT_STACK_SIZE=32 -DGPD_AREA_SIZE=3072 -DCMD_BUF_SIZE=20000 -DCLT_ENTRIES_MAX=512 -DEQUI_TASKS_MAX=8
# Common flags
+6 -1
View File
@@ -753,14 +753,19 @@ int main(int argc, char* argv[]) {
if(instr == 0xFFU || instr == 0U || instr == 3U || instr == 4U) /* exit on zero byte or ctrl+C or ctrl+D */
break;
else if(instr == BS || instr == DEL || instr == CR || instr == LF || instr == ' ' || instr == '\t') { /* ignore the backspace or whitespaces */
if(!smode)
if(!smode && instr != BS && instr != DEL)
cputc(instr); /* echo it if not in silent mode */
if(instr == CR)
cputc(LF);
if(instr == DEL || instr == BS) { /* simulate backspace */
#ifdef __CC65__
if(wherex()>0)
gotox(wherex()-1);
#else
cputc(BS);
cputc(0x20);
cputc(BS);
#endif
if(ram.ibp > 0)
--ram.ibp;
}