Add basic io header

This commit is contained in:
Byron Lathi
2022-03-05 21:17:33 -06:00
parent 9c29aa4fdf
commit 048db615b9
3 changed files with 12 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
CC=cl65
CFLAGS=-t none
CFLAGS=-t none -I.
LDFLAGS=-C link.ld
NAME=bootrom
@@ -11,7 +11,9 @@ SRCS=$(wildcard *.S) $(wildcard *.c)
OBJS+=$(patsubst %.S,%.o,$(filter %S,$(SRCS)))
OBJS+=$(patsubst %.c,%.o,$(filter %c,$(SRCS)))
all: $(BIN)
all: $(HEX)
$(HEX): $(BIN)
objcopy --input-target=binary --output-target=ihex $(BIN) $(HEX)

6
sw/io.h Normal file
View File

@@ -0,0 +1,6 @@
#ifndef _IO_H
#define IO_H
#define IO_REMAP *(unsigned char*)0x7f00
#endif

View File

@@ -1,4 +1,5 @@
#include <io.h>
int main() {
return 1;
IO_REMAP = 1;
}