From 774b224bcabe0f80c01f3ef45713860a39b78d6a Mon Sep 17 00:00:00 2001 From: kdx Date: Fri, 14 Apr 2023 00:47:59 +0200 Subject: screen and input spec --- samples/input.orgaasm | 4 ++++ spec.md | 6 ++++++ src/orgaasm.c | 4 ++++ 3 files changed, 14 insertions(+) create mode 100644 samples/input.orgaasm diff --git a/samples/input.orgaasm b/samples/input.orgaasm new file mode 100644 index 0000000..a97f70c --- /dev/null +++ b/samples/input.orgaasm @@ -0,0 +1,4 @@ + SLP +@loop + LIT ,Input LDA DBG POP + JMP ,loop diff --git a/spec.md b/spec.md index 19678d4..9559004 100644 --- a/spec.md +++ b/spec.md @@ -3,6 +3,12 @@ 16^2 sized stack 16^2 sized return stack +input data is a single short at __0xbffe__ + +screen data is 8-bit indexed on two layers +(one short is two pixels, one for each layer), and located +__from 0xbfff to 0xffff__ + # OPS NOP ( -- ) sit back and do nothing LIT x ( -- x ) push x to top of the stack diff --git a/src/orgaasm.c b/src/orgaasm.c index 3e8477d..18a0e54 100644 --- a/src/orgaasm.c +++ b/src/orgaasm.c @@ -233,6 +233,10 @@ main(int argc, char **argv) } strcpy(data_dup, data); + /* Manually register standard addresses. */ + register_label("Input", 0xbffe); + register_label("Screen", 0xbfff); + /* First pass, find labels. */ first_pass(data); -- cgit v1.2.3