mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-02 08:30:55 +11:00
Compare commits
No commits in common. "02e6979a46fc98de7baa78732f35935cdbd93c4a" and "c0b7b455700c96623cbd47a0d3dd41d6a3e8cac5" have entirely different histories.
02e6979a46
...
c0b7b45570
@ -31,8 +31,7 @@ emul.o: emul.c
|
|||||||
|
|
||||||
.PHONY: updatebootstrap
|
.PHONY: updatebootstrap
|
||||||
updatebootstrap: stage xcomp.fs pack
|
updatebootstrap: stage xcomp.fs pack
|
||||||
./stage < xcomp.fs > new.bin
|
./stage < xcomp.fs | tee forth.bin > /dev/null
|
||||||
mv new.bin forth.bin
|
|
||||||
|
|
||||||
.PHONY: pack
|
.PHONY: pack
|
||||||
pack:
|
pack:
|
||||||
|
BIN
emul/forth.bin
BIN
emul/forth.bin
Binary file not shown.
16
emul/forth.c
16
emul/forth.c
@ -17,8 +17,6 @@
|
|||||||
// read 1024 bytes from the DATA port.
|
// read 1024 bytes from the DATA port.
|
||||||
#define BLK_PORT 0x03
|
#define BLK_PORT 0x03
|
||||||
#define BLKDATA_PORT 0x04
|
#define BLKDATA_PORT 0x04
|
||||||
#define SETX_PORT 0x05
|
|
||||||
#define SETY_PORT 0x06
|
|
||||||
|
|
||||||
static FILE *fp;
|
static FILE *fp;
|
||||||
static int retcode = 0;
|
static int retcode = 0;
|
||||||
@ -66,18 +64,6 @@ static void iowr_ret(uint8_t val)
|
|||||||
retcode = val;
|
retcode = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void iowr_setx(uint8_t val)
|
|
||||||
{
|
|
||||||
int y, x; getyx(w, y, x);
|
|
||||||
wmove(w, y, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void iowr_sety(uint8_t val)
|
|
||||||
{
|
|
||||||
int y, x; getyx(w, y, x);
|
|
||||||
wmove(w, val, x);
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
Machine *m = emul_init();
|
Machine *m = emul_init();
|
||||||
@ -88,8 +74,6 @@ int main(int argc, char *argv[])
|
|||||||
m->iord[STDIO_PORT] = iord_stdio;
|
m->iord[STDIO_PORT] = iord_stdio;
|
||||||
m->iowr[STDIO_PORT] = iowr_stdio;
|
m->iowr[STDIO_PORT] = iowr_stdio;
|
||||||
m->iowr[RET_PORT] = iowr_ret;
|
m->iowr[RET_PORT] = iowr_ret;
|
||||||
m->iowr[SETX_PORT] = iowr_setx;
|
|
||||||
m->iowr[SETY_PORT] = iowr_sety;
|
|
||||||
w = NULL;
|
w = NULL;
|
||||||
if (argc == 2) {
|
if (argc == 2) {
|
||||||
fp = fopen(argv[1], "r");
|
fp = fopen(argv[1], "r");
|
||||||
|
@ -22,8 +22,6 @@
|
|||||||
BLK( I + C@ 4 PC!
|
BLK( I + C@ 4 PC!
|
||||||
LOOP
|
LOOP
|
||||||
;
|
;
|
||||||
: COLS 80 ; : LINES 32 ;
|
|
||||||
: AT-XY 6 PC! ( y ) 5 PC! ( x ) ;
|
|
||||||
|
|
||||||
380 LOAD ( xcomp core high )
|
380 LOAD ( xcomp core high )
|
||||||
(entry) _
|
(entry) _
|
||||||
|
Loading…
Reference in New Issue
Block a user