瀏覽代碼

tools/emul: make shell's cfsin always have all apps compiled in it

pull/10/head
Virgil Dupras 5 年之前
父節點
當前提交
f511289a3a
共有 5 個檔案被更改,包括 54 行新增4 行删除
  1. +1
    -2
      tools/emul/.gitignore
  2. +6
    -2
      tools/emul/Makefile
  3. +3
    -0
      tools/emul/cfsin/readme.txt
  4. +19
    -0
      tools/emul/shell/shell_.asm
  5. +25
    -0
      tools/emul/shell/user.h

+ 1
- 2
tools/emul/.gitignore 查看文件

@@ -2,5 +2,4 @@
/zasm/zasm
/runbin/runbin
/*/*-bin.h
/cfsin
/cfsout
/cfsin/zasm

+ 6
- 2
tools/emul/Makefile 查看文件

@@ -4,9 +4,10 @@ KERNEL = ../../kernel
APPS = ../../apps
ZASMBIN = zasm/zasm
ZASMSH = ../zasm.sh
SHELLAPPS = $(addprefix cfsin/, zasm)

.PHONY: all
all: $(TARGETS)
all: $(TARGETS) $(SHELLAPPS)

shell/kernel-bin.h: shell/shell_.asm $(ZASMBIN)
$(ZASMSH) $(KERNEL) < $< | ./bin2c.sh KERNEL | tee $@ > /dev/null
@@ -30,6 +31,9 @@ libz80/libz80.o: libz80/z80.c
$(CFSPACK):
make -C ../cfspack

$(SHELLAPPS): $(ZASMBIN)
$(ZASMSH) $(KERNEL) $(APPS) shell/user.h < $(APPS)/$(notdir $@)/glue.asm > $@

.PHONY: updatebootstrap
updatebootstrap: $(ZASMBIN) $(INCCFS)
$(ZASMSH) $(KERNEL) < zasm/glue.asm > zasm/kernel.bin
@@ -46,4 +50,4 @@ rescue:

.PHONY: clean
clean:
rm -f $(TARGETS) {zasm,shell}/*-bin.h
rm -f $(TARGETS) $(SHELLAPPS) {zasm,shell}/*-bin.h

+ 3
- 0
tools/emul/cfsin/readme.txt 查看文件

@@ -0,0 +1,3 @@
The contents of this folder ends up in the emulated shell's fake block device,
mounted as a CFS. The goal of the emulated shell being to tests apps, we compile
all apps into this folder for use in the emulated shell.

+ 19
- 0
tools/emul/shell/shell_.asm 查看文件

@@ -11,6 +11,25 @@
jp init

; *** JUMP TABLE ***
jp strncmp
jp addDE
jp addHL
jp upcase
jp unsetZ
jp intoDE
jp intoHL
jp writeHLinDE
jp findchar
jp parseHex
jp parseHexPair
jp blkSel
jp fsFindFN
jp fsOpen
jp fsGetC
jp fsSeek
jp fsTell
jp cpHLDE
jp parseArgs
jp printstr

#include "core.asm"


+ 25
- 0
tools/emul/shell/user.h 查看文件

@@ -0,0 +1,25 @@
.equ USER_CODE 0x9000
.equ USER_RAMSTART 0xa800
.equ FS_HANDLE_SIZE 8

; *** JUMP TABLE ***
.equ strncmp 0x03
.equ addDE 0x06
.equ addHL 0x09
.equ upcase 0x0c
.equ unsetZ 0x0f
.equ intoDE 0x12
.equ intoHL 0x15
.equ writeHLinDE 0x18
.equ findchar 0x1b
.equ parseHex 0x1e
.equ parseHexPair 0x21
.equ blkSel 0x24
.equ fsFindFN 0x27
.equ fsOpen 0x2a
.equ fsGetC 0x2d
.equ fsSeek 0x30
.equ fsTell 0x33
.equ cpHLDE 0x36
.equ parseArgs 0x39
.equ printstr 0x3c

Loading…
取消
儲存