equi

A self-descriptive stack-based PC platform
git clone git://git.luxferre.top/equi.git
Log | Files | Refs | README | LICENSE

commit df01a57c03253c37143adaaf81d66e2b44cd7af8
parent 1f05ca0e9090535f02727c62927c23e57eae9909
Author: Luxferre <lux@ferre>
Date:   Tue, 16 Aug 2022 16:49:50 +0300

Some backspace support for a2e

Diffstat:
MMakefile | 2+-
Mequi.c | 7++++++-
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile @@ -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 diff --git a/equi.c b/equi.c @@ -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; }