mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-24 14:28:06 +11:00
tools/emul: re-organize .h files
What used to be `tools/emul/user.h` was in fact specific to zasm, so I moved it there. To avoid name confusion, I renamed what used to be kernel.h and user.h to kernel-bin.h and user-bin.h.
This commit is contained in:
parent
9a72f10221
commit
04bf2117b2
@ -27,11 +27,14 @@ zasmMain:
|
||||
ld de, .argspecs
|
||||
ld ix, ZASM_RAMSTART
|
||||
call parseArgs
|
||||
jr z, .goodargs
|
||||
; bad args
|
||||
ld hl, 0
|
||||
ld de, 0
|
||||
ld a, SHELL_ERR_BAD_ARGS
|
||||
ret nz
|
||||
ret
|
||||
|
||||
.goodargs:
|
||||
; HL now points to parsed args
|
||||
; Init I/O
|
||||
ld a, (ZASM_RAMSTART) ; blkdev in ID
|
||||
|
4
tools/emul/.gitignore
vendored
4
tools/emul/.gitignore
vendored
@ -1,8 +1,6 @@
|
||||
/shell/shell
|
||||
/zasm/zasm
|
||||
/runbin/runbin
|
||||
/zasm/includes.*
|
||||
/*/kernel.h
|
||||
/*/user.h
|
||||
/*/*-bin.h
|
||||
/cfsin
|
||||
/cfsout
|
||||
|
@ -8,17 +8,17 @@ ZASMSH = ../zasm.sh
|
||||
.PHONY: all
|
||||
all: $(TARGETS)
|
||||
|
||||
shell/kernel.h: shell/shell_.asm $(ZASMBIN)
|
||||
shell/kernel-bin.h: shell/shell_.asm $(ZASMBIN)
|
||||
$(ZASMSH) $(KERNEL) < $< | ./bin2c.sh KERNEL | tee $@ > /dev/null
|
||||
|
||||
zasm/kernel.h: zasm/kernel.bin
|
||||
zasm/kernel-bin.h: zasm/kernel.bin
|
||||
./bin2c.sh KERNEL < $< | tee $@ > /dev/null
|
||||
|
||||
zasm/user.h: zasm/zasm.bin
|
||||
zasm/zasm-bin.h: zasm/zasm.bin
|
||||
./bin2c.sh USERSPACE < $< | tee $@ > /dev/null
|
||||
|
||||
shell/shell: shell/shell.c libz80/libz80.o shell/kernel.h
|
||||
$(ZASMBIN): zasm/zasm.c libz80/libz80.o zasm/kernel.h zasm/user.h $(CFSPACK)
|
||||
shell/shell: shell/shell.c libz80/libz80.o shell/kernel-bin.h
|
||||
$(ZASMBIN): zasm/zasm.c libz80/libz80.o zasm/kernel-bin.h zasm/zasm-bin.h $(CFSPACK)
|
||||
runbin/runbin: runbin/runbin.c libz80/libz80.o
|
||||
$(TARGETS):
|
||||
$(CC) $< libz80/libz80.o -o $@
|
||||
@ -33,7 +33,7 @@ $(CFSPACK):
|
||||
.PHONY: updatebootstrap
|
||||
updatebootstrap: $(ZASMBIN) $(INCCFS)
|
||||
$(ZASMSH) $(KERNEL) < zasm/glue.asm > zasm/kernel.bin
|
||||
$(ZASMSH) $(KERNEL) $(APPS) user.h < $(APPS)/zasm/glue.asm > zasm/zasm.bin
|
||||
$(ZASMSH) $(KERNEL) $(APPS) zasm/user.h < $(APPS)/zasm/glue.asm > zasm/zasm.bin
|
||||
|
||||
# Sometimes, when developing zasm, stuff get messed up and it's hard to unmess
|
||||
# because zasm's brake-up ends up in its bootstrap bins. Sure, we can revert
|
||||
@ -42,8 +42,8 @@ updatebootstrap: $(ZASMBIN) $(INCCFS)
|
||||
.PHONY: rescue
|
||||
rescue:
|
||||
scas -o zasm/kernel.bin -I $(KERNEL) zasm/glue.asm
|
||||
scas -o zasm/zasm.bin -I $(APPS) -I $(KERNEL) $(APPS)/zasm/glue.asm
|
||||
scas -o zasm/zasm.bin -I $(APPS) -I $(KERNEL) -I zasm $(APPS)/zasm/glue.asm
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f $(TARGETS) zasm/{kernel,user}.h shell/kernel.h zasm/includes.*
|
||||
rm -f $(TARGETS) {zasm,shell}/*-bin.h
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include <stdio.h>
|
||||
#include <termios.h>
|
||||
#include "../libz80/z80.h"
|
||||
#include "kernel.h"
|
||||
#include "kernel-bin.h"
|
||||
|
||||
/* Collapse OS shell with filesystem
|
||||
*
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include "../libz80/z80.h"
|
||||
#include "kernel.h"
|
||||
#include "user.h"
|
||||
#include "kernel-bin.h"
|
||||
#include "zasm-bin.h"
|
||||
|
||||
/* zasm reads from a specified blkdev, assemble the file and writes the result
|
||||
* in another specified blkdev. In our emulator layer, we use stdin and stdout
|
||||
|
Loading…
Reference in New Issue
Block a user