mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-27 12:28:06 +11:00
zasm: rename #inc to .inc
scas, it's not needed any more.
This commit is contained in:
parent
340a474941
commit
f4b6c7637d
@ -14,11 +14,11 @@
|
|||||||
;
|
;
|
||||||
; *** Includes ***
|
; *** Includes ***
|
||||||
|
|
||||||
#include "user.h"
|
.inc "user.h"
|
||||||
#include "err.h"
|
.inc "err.h"
|
||||||
.org USER_CODE
|
.org USER_CODE
|
||||||
.equ AT28W_RAMSTART USER_RAMSTART
|
.equ AT28W_RAMSTART USER_RAMSTART
|
||||||
|
|
||||||
jp at28wMain
|
jp at28wMain
|
||||||
|
|
||||||
#include "at28w/main.asm"
|
.inc "at28w/main.asm"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "user.h"
|
.inc "user.h"
|
||||||
|
|
||||||
; *** Overridable consts ***
|
; *** Overridable consts ***
|
||||||
; Maximum number of lines allowed in the buffer.
|
; Maximum number of lines allowed in the buffer.
|
||||||
@ -8,18 +8,18 @@
|
|||||||
|
|
||||||
; ******
|
; ******
|
||||||
|
|
||||||
#include "err.h"
|
.inc "err.h"
|
||||||
.org USER_CODE
|
.org USER_CODE
|
||||||
|
|
||||||
jp edMain
|
jp edMain
|
||||||
|
|
||||||
#include "lib/util.asm"
|
.inc "lib/util.asm"
|
||||||
#include "lib/parse.asm"
|
.inc "lib/parse.asm"
|
||||||
.equ IO_RAMSTART USER_RAMSTART
|
.equ IO_RAMSTART USER_RAMSTART
|
||||||
#include "ed/io.asm"
|
.inc "ed/io.asm"
|
||||||
.equ BUF_RAMSTART IO_RAMEND
|
.equ BUF_RAMSTART IO_RAMEND
|
||||||
#include "ed/buf.asm"
|
.inc "ed/buf.asm"
|
||||||
.equ CMD_RAMSTART BUF_RAMEND
|
.equ CMD_RAMSTART BUF_RAMEND
|
||||||
#include "ed/cmd.asm"
|
.inc "ed/cmd.asm"
|
||||||
.equ ED_RAMSTART CMD_RAMEND
|
.equ ED_RAMSTART CMD_RAMEND
|
||||||
#include "ed/main.asm"
|
.inc "ed/main.asm"
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
;
|
;
|
||||||
; *** Includes ***
|
; *** Includes ***
|
||||||
|
|
||||||
#include "user.h"
|
.inc "user.h"
|
||||||
.org USER_CODE
|
.org USER_CODE
|
||||||
|
|
||||||
jp memtMain
|
jp memtMain
|
||||||
|
|
||||||
#include "memt/main.asm"
|
.inc "memt/main.asm"
|
||||||
|
@ -18,10 +18,10 @@
|
|||||||
;
|
;
|
||||||
; *** Includes ***
|
; *** Includes ***
|
||||||
|
|
||||||
#include "user.h"
|
.inc "user.h"
|
||||||
.org USER_CODE
|
.org USER_CODE
|
||||||
.equ SDCT_RAMSTART USER_RAMSTART
|
.equ SDCT_RAMSTART USER_RAMSTART
|
||||||
|
|
||||||
jp sdctMain
|
jp sdctMain
|
||||||
|
|
||||||
#include "sdct/main.asm"
|
.inc "sdct/main.asm"
|
||||||
|
@ -99,7 +99,7 @@ is very useful for variable definitions and for jump tables.
|
|||||||
|
|
||||||
## Includes
|
## Includes
|
||||||
|
|
||||||
The `#inc` directive is special. It takes a string literal as an argument and
|
The `.inc` directive is special. It takes a string literal as an argument and
|
||||||
opens, in the currently active filesystem, the file with the specified name.
|
opens, in the currently active filesystem, the file with the specified name.
|
||||||
|
|
||||||
It then proceeds to parse that file as if its content had been copy/pasted in
|
It then proceeds to parse that file as if its content had been copy/pasted in
|
||||||
@ -108,7 +108,7 @@ elsewhere. Constants too. An exception is local labels: a local namespace always
|
|||||||
ends at the end of an included file.
|
ends at the end of an included file.
|
||||||
|
|
||||||
There an important limitation with includes: only one level of includes is
|
There an important limitation with includes: only one level of includes is
|
||||||
allowed. An included file cannot have an `#inc` directive.
|
allowed. An included file cannot have an `.inc` directive.
|
||||||
|
|
||||||
## Directives
|
## Directives
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ allowed. An included file cannot have an `#inc` directive.
|
|||||||
RAM constants, etc. The value is only outputted during the second
|
RAM constants, etc. The value is only outputted during the second
|
||||||
pass.
|
pass.
|
||||||
|
|
||||||
**#inc**: Takes a string literal as an argument. Open the file name specified
|
**.inc**: Takes a string literal as an argument. Open the file name specified
|
||||||
in the argument in the currently active filesystem, parse that file
|
in the argument in the currently active filesystem, parse that file
|
||||||
and output its binary content as is the code has been in the includer
|
and output its binary content as is the code has been in the includer
|
||||||
file.
|
file.
|
||||||
|
@ -25,7 +25,7 @@ directiveNames:
|
|||||||
.db ".ORG"
|
.db ".ORG"
|
||||||
.db ".FIL"
|
.db ".FIL"
|
||||||
.db ".OUT"
|
.db ".OUT"
|
||||||
.db "#inc"
|
.db ".INC"
|
||||||
.db ".BIN"
|
.db ".BIN"
|
||||||
|
|
||||||
; This is a list of handlers corresponding to indexes in directiveNames
|
; This is a list of handlers corresponding to indexes in directiveNames
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
; FS_HANDLE_SIZE
|
; FS_HANDLE_SIZE
|
||||||
; BLOCKDEV_SIZE
|
; BLOCKDEV_SIZE
|
||||||
|
|
||||||
#include "user.h"
|
.inc "user.h"
|
||||||
|
|
||||||
; *** Overridable consts ***
|
; *** Overridable consts ***
|
||||||
; Maximum number of symbols we can have in the global and consts registry
|
; Maximum number of symbols we can have in the global and consts registry
|
||||||
@ -63,26 +63,26 @@
|
|||||||
|
|
||||||
; ******
|
; ******
|
||||||
|
|
||||||
#include "err.h"
|
.inc "err.h"
|
||||||
.org USER_CODE
|
.org USER_CODE
|
||||||
|
|
||||||
jp zasmMain
|
jp zasmMain
|
||||||
|
|
||||||
#include "zasm/const.asm"
|
.inc "zasm/const.asm"
|
||||||
#include "lib/util.asm"
|
.inc "lib/util.asm"
|
||||||
#include "zasm/util.asm"
|
.inc "zasm/util.asm"
|
||||||
.equ IO_RAMSTART USER_RAMSTART
|
.equ IO_RAMSTART USER_RAMSTART
|
||||||
#include "zasm/io.asm"
|
.inc "zasm/io.asm"
|
||||||
.equ TOK_RAMSTART IO_RAMEND
|
.equ TOK_RAMSTART IO_RAMEND
|
||||||
#include "zasm/tok.asm"
|
.inc "zasm/tok.asm"
|
||||||
#include "lib/parse.asm"
|
.inc "lib/parse.asm"
|
||||||
.equ INS_RAMSTART TOK_RAMEND
|
.equ INS_RAMSTART TOK_RAMEND
|
||||||
#include "zasm/instr.asm"
|
.inc "zasm/instr.asm"
|
||||||
.equ DIREC_RAMSTART INS_RAMEND
|
.equ DIREC_RAMSTART INS_RAMEND
|
||||||
#include "zasm/directive.asm"
|
.inc "zasm/directive.asm"
|
||||||
#include "zasm/parse.asm"
|
.inc "zasm/parse.asm"
|
||||||
#include "zasm/expr.asm"
|
.inc "zasm/expr.asm"
|
||||||
.equ SYM_RAMSTART DIREC_RAMEND
|
.equ SYM_RAMSTART DIREC_RAMEND
|
||||||
#include "zasm/symbol.asm"
|
.inc "zasm/symbol.asm"
|
||||||
.equ ZASM_RAMSTART SYM_RAMEND
|
.equ ZASM_RAMSTART SYM_RAMEND
|
||||||
#include "zasm/main.asm"
|
.inc "zasm/main.asm"
|
||||||
|
@ -217,7 +217,7 @@ shellPrintErr:
|
|||||||
; Extra commands: Other parts might define new commands. You can add these
|
; Extra commands: Other parts might define new commands. You can add these
|
||||||
; commands to your shell. First, set SHELL_EXTRA_CMD_COUNT to
|
; commands to your shell. First, set SHELL_EXTRA_CMD_COUNT to
|
||||||
; the number of extra commands to add, then add a ".dw"
|
; the number of extra commands to add, then add a ".dw"
|
||||||
; directive *just* after your '#include "shell.asm"'. Voila!
|
; directive *just* after your '.inc "shell.asm"'. Voila!
|
||||||
;
|
;
|
||||||
|
|
||||||
; Set memory pointer to the specified address (word).
|
; Set memory pointer to the specified address (word).
|
||||||
|
@ -11,35 +11,35 @@ jp init
|
|||||||
.fill 0x38-$
|
.fill 0x38-$
|
||||||
jp aciaInt
|
jp aciaInt
|
||||||
|
|
||||||
#include "err.h"
|
.inc "err.h"
|
||||||
#include "core.asm"
|
.inc "core.asm"
|
||||||
#include "parse.asm"
|
.inc "parse.asm"
|
||||||
.equ ACIA_RAMSTART RAMSTART
|
.equ ACIA_RAMSTART RAMSTART
|
||||||
#include "acia.asm"
|
.inc "acia.asm"
|
||||||
|
|
||||||
.equ MMAP_START 0xd000
|
.equ MMAP_START 0xd000
|
||||||
#include "mmap.asm"
|
.inc "mmap.asm"
|
||||||
|
|
||||||
.equ BLOCKDEV_RAMSTART ACIA_RAMEND
|
.equ BLOCKDEV_RAMSTART ACIA_RAMEND
|
||||||
.equ BLOCKDEV_COUNT 1
|
.equ BLOCKDEV_COUNT 1
|
||||||
#include "blockdev.asm"
|
.inc "blockdev.asm"
|
||||||
; List of devices
|
; List of devices
|
||||||
.dw mmapGetC, mmapPutC
|
.dw mmapGetC, mmapPutC
|
||||||
|
|
||||||
.equ STDIO_RAMSTART BLOCKDEV_RAMEND
|
.equ STDIO_RAMSTART BLOCKDEV_RAMEND
|
||||||
#include "stdio.asm"
|
.inc "stdio.asm"
|
||||||
|
|
||||||
.equ AT28W_RAMSTART STDIO_RAMEND
|
.equ AT28W_RAMSTART STDIO_RAMEND
|
||||||
#include "at28w/main.asm"
|
.inc "at28w/main.asm"
|
||||||
|
|
||||||
.equ SHELL_RAMSTART AT28W_RAMEND
|
.equ SHELL_RAMSTART AT28W_RAMEND
|
||||||
.equ SHELL_EXTRA_CMD_COUNT 5
|
.equ SHELL_EXTRA_CMD_COUNT 5
|
||||||
#include "shell.asm"
|
.inc "shell.asm"
|
||||||
; Extra cmds
|
; Extra cmds
|
||||||
.dw a28wCmd
|
.dw a28wCmd
|
||||||
.dw blkBselCmd, blkSeekCmd, blkLoadCmd, blkSaveCmd
|
.dw blkBselCmd, blkSeekCmd, blkLoadCmd, blkSaveCmd
|
||||||
|
|
||||||
#include "blockdev_cmds.asm"
|
.inc "blockdev_cmds.asm"
|
||||||
|
|
||||||
init:
|
init:
|
||||||
di
|
di
|
||||||
|
@ -11,18 +11,18 @@ jp init
|
|||||||
.fill 0x38-$
|
.fill 0x38-$
|
||||||
jp aciaInt
|
jp aciaInt
|
||||||
|
|
||||||
#include "err.h"
|
.inc "err.h"
|
||||||
#include "core.asm"
|
.inc "core.asm"
|
||||||
#include "parse.asm"
|
.inc "parse.asm"
|
||||||
.equ ACIA_RAMSTART RAMSTART
|
.equ ACIA_RAMSTART RAMSTART
|
||||||
#include "acia.asm"
|
.inc "acia.asm"
|
||||||
|
|
||||||
.equ STDIO_RAMSTART ACIA_RAMEND
|
.equ STDIO_RAMSTART ACIA_RAMEND
|
||||||
#include "stdio.asm"
|
.inc "stdio.asm"
|
||||||
|
|
||||||
.equ SHELL_RAMSTART STDIO_RAMEND
|
.equ SHELL_RAMSTART STDIO_RAMEND
|
||||||
.equ SHELL_EXTRA_CMD_COUNT 0
|
.equ SHELL_EXTRA_CMD_COUNT 0
|
||||||
#include "shell.asm"
|
.inc "shell.asm"
|
||||||
|
|
||||||
init:
|
init:
|
||||||
di
|
di
|
||||||
|
@ -6,21 +6,21 @@
|
|||||||
|
|
||||||
jp init
|
jp init
|
||||||
|
|
||||||
#include "err.h"
|
.inc "err.h"
|
||||||
#include "core.asm"
|
.inc "core.asm"
|
||||||
#include "parse.asm"
|
.inc "parse.asm"
|
||||||
.equ ACIA_RAMSTART RAMSTART
|
.equ ACIA_RAMSTART RAMSTART
|
||||||
#include "acia.asm"
|
.inc "acia.asm"
|
||||||
|
|
||||||
.equ KBD_RAMSTART ACIA_RAMEND
|
.equ KBD_RAMSTART ACIA_RAMEND
|
||||||
#include "kbd.asm"
|
.inc "kbd.asm"
|
||||||
|
|
||||||
.equ STDIO_RAMSTART KBD_RAMEND
|
.equ STDIO_RAMSTART KBD_RAMEND
|
||||||
#include "stdio.asm"
|
.inc "stdio.asm"
|
||||||
|
|
||||||
.equ SHELL_RAMSTART STDIO_RAMEND
|
.equ SHELL_RAMSTART STDIO_RAMEND
|
||||||
.equ SHELL_EXTRA_CMD_COUNT 0
|
.equ SHELL_EXTRA_CMD_COUNT 0
|
||||||
#include "shell.asm"
|
.inc "shell.asm"
|
||||||
|
|
||||||
init:
|
init:
|
||||||
di
|
di
|
||||||
|
@ -20,44 +20,44 @@ jp sdcSendRecv
|
|||||||
.fill 0x38-$
|
.fill 0x38-$
|
||||||
jp aciaInt
|
jp aciaInt
|
||||||
|
|
||||||
#include "err.h"
|
.inc "err.h"
|
||||||
#include "core.asm"
|
.inc "core.asm"
|
||||||
#include "parse.asm"
|
.inc "parse.asm"
|
||||||
.equ ACIA_RAMSTART RAMSTART
|
.equ ACIA_RAMSTART RAMSTART
|
||||||
#include "acia.asm"
|
.inc "acia.asm"
|
||||||
.equ BLOCKDEV_RAMSTART ACIA_RAMEND
|
.equ BLOCKDEV_RAMSTART ACIA_RAMEND
|
||||||
.equ BLOCKDEV_COUNT 2
|
.equ BLOCKDEV_COUNT 2
|
||||||
#include "blockdev.asm"
|
.inc "blockdev.asm"
|
||||||
; List of devices
|
; List of devices
|
||||||
.dw sdcGetC, sdcPutC
|
.dw sdcGetC, sdcPutC
|
||||||
.dw blk2GetC, blk2PutC
|
.dw blk2GetC, blk2PutC
|
||||||
|
|
||||||
|
|
||||||
.equ STDIO_RAMSTART BLOCKDEV_RAMEND
|
.equ STDIO_RAMSTART BLOCKDEV_RAMEND
|
||||||
#include "stdio.asm"
|
.inc "stdio.asm"
|
||||||
|
|
||||||
.equ FS_RAMSTART STDIO_RAMEND
|
.equ FS_RAMSTART STDIO_RAMEND
|
||||||
.equ FS_HANDLE_COUNT 1
|
.equ FS_HANDLE_COUNT 1
|
||||||
#include "fs.asm"
|
.inc "fs.asm"
|
||||||
|
|
||||||
.equ SHELL_RAMSTART FS_RAMEND
|
.equ SHELL_RAMSTART FS_RAMEND
|
||||||
.equ SHELL_EXTRA_CMD_COUNT 11
|
.equ SHELL_EXTRA_CMD_COUNT 11
|
||||||
#include "shell.asm"
|
.inc "shell.asm"
|
||||||
.dw sdcInitializeCmd, sdcFlushCmd
|
.dw sdcInitializeCmd, sdcFlushCmd
|
||||||
.dw blkBselCmd, blkSeekCmd, blkLoadCmd, blkSaveCmd
|
.dw blkBselCmd, blkSeekCmd, blkLoadCmd, blkSaveCmd
|
||||||
.dw fsOnCmd, flsCmd, fnewCmd, fdelCmd, fopnCmd
|
.dw fsOnCmd, flsCmd, fnewCmd, fdelCmd, fopnCmd
|
||||||
|
|
||||||
#include "blockdev_cmds.asm"
|
.inc "blockdev_cmds.asm"
|
||||||
#include "fs_cmds.asm"
|
.inc "fs_cmds.asm"
|
||||||
|
|
||||||
.equ PGM_RAMSTART SHELL_RAMEND
|
.equ PGM_RAMSTART SHELL_RAMEND
|
||||||
#include "pgm.asm"
|
.inc "pgm.asm"
|
||||||
|
|
||||||
.equ SDC_RAMSTART PGM_RAMEND
|
.equ SDC_RAMSTART PGM_RAMEND
|
||||||
.equ SDC_PORT_CSHIGH 6
|
.equ SDC_PORT_CSHIGH 6
|
||||||
.equ SDC_PORT_CSLOW 5
|
.equ SDC_PORT_CSLOW 5
|
||||||
.equ SDC_PORT_SPI 4
|
.equ SDC_PORT_SPI 4
|
||||||
#include "sdc.asm"
|
.inc "sdc.asm"
|
||||||
|
|
||||||
init:
|
init:
|
||||||
di
|
di
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "user.h"
|
.inc "user.h"
|
||||||
.org USER_CODE
|
.org USER_CODE
|
||||||
|
|
||||||
ld hl, sAwesome
|
ld hl, sAwesome
|
||||||
|
@ -46,14 +46,14 @@ jp aciaInt
|
|||||||
jp sdcPutC
|
jp sdcPutC
|
||||||
jp blkGetC
|
jp blkGetC
|
||||||
|
|
||||||
#include "err.h"
|
.inc "err.h"
|
||||||
#include "core.asm"
|
.inc "core.asm"
|
||||||
#include "parse.asm"
|
.inc "parse.asm"
|
||||||
.equ ACIA_RAMSTART RAMSTART
|
.equ ACIA_RAMSTART RAMSTART
|
||||||
#include "acia.asm"
|
.inc "acia.asm"
|
||||||
.equ BLOCKDEV_RAMSTART ACIA_RAMEND
|
.equ BLOCKDEV_RAMSTART ACIA_RAMEND
|
||||||
.equ BLOCKDEV_COUNT 4
|
.equ BLOCKDEV_COUNT 4
|
||||||
#include "blockdev.asm"
|
.inc "blockdev.asm"
|
||||||
; List of devices
|
; List of devices
|
||||||
.dw sdcGetC, sdcPutC
|
.dw sdcGetC, sdcPutC
|
||||||
.dw blk1GetC, blk1PutC
|
.dw blk1GetC, blk1PutC
|
||||||
@ -62,33 +62,33 @@ jp aciaInt
|
|||||||
|
|
||||||
|
|
||||||
.equ MMAP_START 0xe000
|
.equ MMAP_START 0xe000
|
||||||
#include "mmap.asm"
|
.inc "mmap.asm"
|
||||||
|
|
||||||
.equ STDIO_RAMSTART BLOCKDEV_RAMEND
|
.equ STDIO_RAMSTART BLOCKDEV_RAMEND
|
||||||
#include "stdio.asm"
|
.inc "stdio.asm"
|
||||||
|
|
||||||
.equ FS_RAMSTART STDIO_RAMEND
|
.equ FS_RAMSTART STDIO_RAMEND
|
||||||
.equ FS_HANDLE_COUNT 2
|
.equ FS_HANDLE_COUNT 2
|
||||||
#include "fs.asm"
|
.inc "fs.asm"
|
||||||
|
|
||||||
.equ SHELL_RAMSTART FS_RAMEND
|
.equ SHELL_RAMSTART FS_RAMEND
|
||||||
.equ SHELL_EXTRA_CMD_COUNT 11
|
.equ SHELL_EXTRA_CMD_COUNT 11
|
||||||
#include "shell.asm"
|
.inc "shell.asm"
|
||||||
.dw sdcInitializeCmd, sdcFlushCmd
|
.dw sdcInitializeCmd, sdcFlushCmd
|
||||||
.dw blkBselCmd, blkSeekCmd, blkLoadCmd, blkSaveCmd
|
.dw blkBselCmd, blkSeekCmd, blkLoadCmd, blkSaveCmd
|
||||||
.dw fsOnCmd, flsCmd, fnewCmd, fdelCmd, fopnCmd
|
.dw fsOnCmd, flsCmd, fnewCmd, fdelCmd, fopnCmd
|
||||||
|
|
||||||
#include "fs_cmds.asm"
|
.inc "fs_cmds.asm"
|
||||||
#include "blockdev_cmds.asm"
|
.inc "blockdev_cmds.asm"
|
||||||
|
|
||||||
.equ PGM_RAMSTART SHELL_RAMEND
|
.equ PGM_RAMSTART SHELL_RAMEND
|
||||||
#include "pgm.asm"
|
.inc "pgm.asm"
|
||||||
|
|
||||||
.equ SDC_RAMSTART PGM_RAMEND
|
.equ SDC_RAMSTART PGM_RAMEND
|
||||||
.equ SDC_PORT_CSHIGH 6
|
.equ SDC_PORT_CSHIGH 6
|
||||||
.equ SDC_PORT_CSLOW 5
|
.equ SDC_PORT_CSLOW 5
|
||||||
.equ SDC_PORT_SPI 4
|
.equ SDC_PORT_SPI 4
|
||||||
#include "sdc.asm"
|
.inc "sdc.asm"
|
||||||
|
|
||||||
.out SDC_RAMEND
|
.out SDC_RAMEND
|
||||||
|
|
||||||
|
@ -8,22 +8,22 @@
|
|||||||
.fill 0x66-$
|
.fill 0x66-$
|
||||||
retn
|
retn
|
||||||
|
|
||||||
#include "err.h"
|
.inc "err.h"
|
||||||
#include "core.asm"
|
.inc "core.asm"
|
||||||
#include "parse.asm"
|
.inc "parse.asm"
|
||||||
|
|
||||||
.equ PAD_RAMSTART RAMSTART
|
.equ PAD_RAMSTART RAMSTART
|
||||||
#include "sms/pad.asm"
|
.inc "sms/pad.asm"
|
||||||
|
|
||||||
.equ VDP_RAMSTART PAD_RAMEND
|
.equ VDP_RAMSTART PAD_RAMEND
|
||||||
#include "sms/vdp.asm"
|
.inc "sms/vdp.asm"
|
||||||
|
|
||||||
.equ STDIO_RAMSTART VDP_RAMEND
|
.equ STDIO_RAMSTART VDP_RAMEND
|
||||||
#include "stdio.asm"
|
.inc "stdio.asm"
|
||||||
|
|
||||||
.equ SHELL_RAMSTART STDIO_RAMEND
|
.equ SHELL_RAMSTART STDIO_RAMEND
|
||||||
.equ SHELL_EXTRA_CMD_COUNT 0
|
.equ SHELL_EXTRA_CMD_COUNT 0
|
||||||
#include "shell.asm"
|
.inc "shell.asm"
|
||||||
|
|
||||||
init:
|
init:
|
||||||
di
|
di
|
||||||
|
@ -8,24 +8,24 @@
|
|||||||
.fill 0x66-$
|
.fill 0x66-$
|
||||||
retn
|
retn
|
||||||
|
|
||||||
#include "err.h"
|
.inc "err.h"
|
||||||
#include "core.asm"
|
.inc "core.asm"
|
||||||
#include "parse.asm"
|
.inc "parse.asm"
|
||||||
|
|
||||||
#include "sms/kbd.asm"
|
.inc "sms/kbd.asm"
|
||||||
.equ KBD_RAMSTART RAMSTART
|
.equ KBD_RAMSTART RAMSTART
|
||||||
.equ KBD_FETCHKC smskbdFetchKCB
|
.equ KBD_FETCHKC smskbdFetchKCB
|
||||||
#include "kbd.asm"
|
.inc "kbd.asm"
|
||||||
|
|
||||||
.equ VDP_RAMSTART KBD_RAMEND
|
.equ VDP_RAMSTART KBD_RAMEND
|
||||||
#include "sms/vdp.asm"
|
.inc "sms/vdp.asm"
|
||||||
|
|
||||||
.equ STDIO_RAMSTART VDP_RAMEND
|
.equ STDIO_RAMSTART VDP_RAMEND
|
||||||
#include "stdio.asm"
|
.inc "stdio.asm"
|
||||||
|
|
||||||
.equ SHELL_RAMSTART STDIO_RAMEND
|
.equ SHELL_RAMSTART STDIO_RAMEND
|
||||||
.equ SHELL_EXTRA_CMD_COUNT 0
|
.equ SHELL_EXTRA_CMD_COUNT 0
|
||||||
#include "shell.asm"
|
.inc "shell.asm"
|
||||||
|
|
||||||
init:
|
init:
|
||||||
di
|
di
|
||||||
|
@ -39,29 +39,29 @@
|
|||||||
.fill 0x66-$
|
.fill 0x66-$
|
||||||
retn
|
retn
|
||||||
|
|
||||||
#include "err.h"
|
.inc "err.h"
|
||||||
#include "core.asm"
|
.inc "core.asm"
|
||||||
#include "parse.asm"
|
.inc "parse.asm"
|
||||||
|
|
||||||
#include "sms/kbd.asm"
|
.inc "sms/kbd.asm"
|
||||||
.equ KBD_RAMSTART RAMSTART
|
.equ KBD_RAMSTART RAMSTART
|
||||||
.equ KBD_FETCHKC smskbdFetchKCB
|
.equ KBD_FETCHKC smskbdFetchKCB
|
||||||
#include "kbd.asm"
|
.inc "kbd.asm"
|
||||||
|
|
||||||
.equ VDP_RAMSTART KBD_RAMEND
|
.equ VDP_RAMSTART KBD_RAMEND
|
||||||
#include "sms/vdp.asm"
|
.inc "sms/vdp.asm"
|
||||||
|
|
||||||
.equ STDIO_RAMSTART VDP_RAMEND
|
.equ STDIO_RAMSTART VDP_RAMEND
|
||||||
#include "stdio.asm"
|
.inc "stdio.asm"
|
||||||
|
|
||||||
.equ MMAP_START 0xd700
|
.equ MMAP_START 0xd700
|
||||||
; 0x180 is to leave some space for the stack
|
; 0x180 is to leave some space for the stack
|
||||||
.equ MMAP_LEN RAMEND-MMAP_START-0x180
|
.equ MMAP_LEN RAMEND-MMAP_START-0x180
|
||||||
#include "mmap.asm"
|
.inc "mmap.asm"
|
||||||
|
|
||||||
.equ BLOCKDEV_RAMSTART STDIO_RAMEND
|
.equ BLOCKDEV_RAMSTART STDIO_RAMEND
|
||||||
.equ BLOCKDEV_COUNT 3
|
.equ BLOCKDEV_COUNT 3
|
||||||
#include "blockdev.asm"
|
.inc "blockdev.asm"
|
||||||
; List of devices
|
; List of devices
|
||||||
.dw mmapGetC, mmapPutC
|
.dw mmapGetC, mmapPutC
|
||||||
.dw f0GetC, f0PutC
|
.dw f0GetC, f0PutC
|
||||||
@ -70,20 +70,20 @@
|
|||||||
|
|
||||||
.equ FS_RAMSTART BLOCKDEV_RAMEND
|
.equ FS_RAMSTART BLOCKDEV_RAMEND
|
||||||
.equ FS_HANDLE_COUNT 2
|
.equ FS_HANDLE_COUNT 2
|
||||||
#include "fs.asm"
|
.inc "fs.asm"
|
||||||
|
|
||||||
.equ SHELL_RAMSTART FS_RAMEND
|
.equ SHELL_RAMSTART FS_RAMEND
|
||||||
.equ SHELL_EXTRA_CMD_COUNT 10
|
.equ SHELL_EXTRA_CMD_COUNT 10
|
||||||
#include "shell.asm"
|
.inc "shell.asm"
|
||||||
.dw edCmd, zasmCmd, fnewCmd, fdelCmd, fopnCmd, flsCmd, blkBselCmd
|
.dw edCmd, zasmCmd, fnewCmd, fdelCmd, fopnCmd, flsCmd, blkBselCmd
|
||||||
.dw blkSeekCmd, blkLoadCmd, blkSaveCmd
|
.dw blkSeekCmd, blkLoadCmd, blkSaveCmd
|
||||||
|
|
||||||
#include "blockdev_cmds.asm"
|
.inc "blockdev_cmds.asm"
|
||||||
#include "fs_cmds.asm"
|
.inc "fs_cmds.asm"
|
||||||
|
|
||||||
.equ PGM_RAMSTART SHELL_RAMEND
|
.equ PGM_RAMSTART SHELL_RAMEND
|
||||||
.equ PGM_CODEADDR USER_RAMSTART
|
.equ PGM_CODEADDR USER_RAMSTART
|
||||||
#include "pgm.asm"
|
.inc "pgm.asm"
|
||||||
|
|
||||||
.out PGM_RAMEND
|
.out PGM_RAMEND
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "user.h"
|
.inc "user.h"
|
||||||
.org USER_CODE
|
.org USER_CODE
|
||||||
|
|
||||||
ld hl, sAwesome
|
ld hl, sAwesome
|
||||||
|
@ -40,13 +40,13 @@
|
|||||||
jp stdioPutC
|
jp stdioPutC
|
||||||
jp stdioReadLine
|
jp stdioReadLine
|
||||||
|
|
||||||
#include "core.asm"
|
.inc "core.asm"
|
||||||
#include "err.h"
|
.inc "err.h"
|
||||||
#include "parse.asm"
|
.inc "parse.asm"
|
||||||
|
|
||||||
.equ BLOCKDEV_RAMSTART RAMSTART
|
.equ BLOCKDEV_RAMSTART RAMSTART
|
||||||
.equ BLOCKDEV_COUNT 4
|
.equ BLOCKDEV_COUNT 4
|
||||||
#include "blockdev.asm"
|
.inc "blockdev.asm"
|
||||||
; List of devices
|
; List of devices
|
||||||
.dw fsdevGetC, fsdevPutC
|
.dw fsdevGetC, fsdevPutC
|
||||||
.dw stdoutGetC, stdoutPutC
|
.dw stdoutGetC, stdoutPutC
|
||||||
@ -55,27 +55,27 @@
|
|||||||
|
|
||||||
|
|
||||||
.equ MMAP_START 0xe000
|
.equ MMAP_START 0xe000
|
||||||
#include "mmap.asm"
|
.inc "mmap.asm"
|
||||||
|
|
||||||
.equ STDIO_RAMSTART BLOCKDEV_RAMEND
|
.equ STDIO_RAMSTART BLOCKDEV_RAMEND
|
||||||
#include "stdio.asm"
|
.inc "stdio.asm"
|
||||||
|
|
||||||
.equ FS_RAMSTART STDIO_RAMEND
|
.equ FS_RAMSTART STDIO_RAMEND
|
||||||
.equ FS_HANDLE_COUNT 2
|
.equ FS_HANDLE_COUNT 2
|
||||||
#include "fs.asm"
|
.inc "fs.asm"
|
||||||
|
|
||||||
.equ SHELL_RAMSTART FS_RAMEND
|
.equ SHELL_RAMSTART FS_RAMEND
|
||||||
.equ SHELL_EXTRA_CMD_COUNT 9
|
.equ SHELL_EXTRA_CMD_COUNT 9
|
||||||
#include "shell.asm"
|
.inc "shell.asm"
|
||||||
.dw blkBselCmd, blkSeekCmd, blkLoadCmd, blkSaveCmd
|
.dw blkBselCmd, blkSeekCmd, blkLoadCmd, blkSaveCmd
|
||||||
.dw fsOnCmd, flsCmd, fnewCmd, fdelCmd, fopnCmd
|
.dw fsOnCmd, flsCmd, fnewCmd, fdelCmd, fopnCmd
|
||||||
|
|
||||||
#include "blockdev_cmds.asm"
|
.inc "blockdev_cmds.asm"
|
||||||
#include "fs_cmds.asm"
|
.inc "fs_cmds.asm"
|
||||||
|
|
||||||
.equ PGM_RAMSTART SHELL_RAMEND
|
.equ PGM_RAMSTART SHELL_RAMEND
|
||||||
.equ PGM_CODEADDR USERCODE
|
.equ PGM_CODEADDR USERCODE
|
||||||
#include "pgm.asm"
|
.inc "pgm.asm"
|
||||||
|
|
||||||
;.out PGM_RAMEND
|
;.out PGM_RAMEND
|
||||||
|
|
||||||
|
@ -33,23 +33,23 @@ jp _blkSeek
|
|||||||
jp _blkTell
|
jp _blkTell
|
||||||
jp printstr
|
jp printstr
|
||||||
|
|
||||||
#include "core.asm"
|
.inc "core.asm"
|
||||||
#include "err.h"
|
.inc "err.h"
|
||||||
#include "parse.asm"
|
.inc "parse.asm"
|
||||||
.equ BLOCKDEV_RAMSTART RAMSTART
|
.equ BLOCKDEV_RAMSTART RAMSTART
|
||||||
.equ BLOCKDEV_COUNT 3
|
.equ BLOCKDEV_COUNT 3
|
||||||
#include "blockdev.asm"
|
.inc "blockdev.asm"
|
||||||
; List of devices
|
; List of devices
|
||||||
.dw emulGetC, unsetZ
|
.dw emulGetC, unsetZ
|
||||||
.dw unsetZ, emulPutC
|
.dw unsetZ, emulPutC
|
||||||
.dw fsdevGetC, fsdevPutC
|
.dw fsdevGetC, fsdevPutC
|
||||||
|
|
||||||
.equ STDIO_RAMSTART BLOCKDEV_RAMEND
|
.equ STDIO_RAMSTART BLOCKDEV_RAMEND
|
||||||
#include "stdio.asm"
|
.inc "stdio.asm"
|
||||||
|
|
||||||
.equ FS_RAMSTART STDIO_RAMEND
|
.equ FS_RAMSTART STDIO_RAMEND
|
||||||
.equ FS_HANDLE_COUNT 0
|
.equ FS_HANDLE_COUNT 0
|
||||||
#include "fs.asm"
|
.inc "fs.asm"
|
||||||
|
|
||||||
init:
|
init:
|
||||||
di
|
di
|
||||||
|
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
jp test
|
jp test
|
||||||
|
|
||||||
#include "core.asm"
|
.inc "core.asm"
|
||||||
|
|
||||||
testNum: .db 1
|
testNum: .db 1
|
||||||
|
|
||||||
|
@ -9,16 +9,16 @@
|
|||||||
|
|
||||||
jp test
|
jp test
|
||||||
|
|
||||||
#include "core.asm"
|
.inc "core.asm"
|
||||||
#include "parse.asm"
|
.inc "parse.asm"
|
||||||
#include "lib/util.asm"
|
.inc "lib/util.asm"
|
||||||
#include "zasm/util.asm"
|
.inc "zasm/util.asm"
|
||||||
#include "zasm/const.asm"
|
.inc "zasm/const.asm"
|
||||||
#include "lib/parse.asm"
|
.inc "lib/parse.asm"
|
||||||
#include "zasm/parse.asm"
|
.inc "zasm/parse.asm"
|
||||||
.equ SYM_RAMSTART DIREC_LASTVAL+2
|
.equ SYM_RAMSTART DIREC_LASTVAL+2
|
||||||
#include "zasm/symbol.asm"
|
.inc "zasm/symbol.asm"
|
||||||
#include "zasm/expr.asm"
|
.inc "zasm/expr.asm"
|
||||||
|
|
||||||
; Pretend that we aren't in first pass
|
; Pretend that we aren't in first pass
|
||||||
zasmIsFirstPass:
|
zasmIsFirstPass:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
jp test
|
jp test
|
||||||
|
|
||||||
#include "core.asm"
|
.inc "core.asm"
|
||||||
#include "parse.asm"
|
.inc "parse.asm"
|
||||||
|
|
||||||
zasmGetPC:
|
zasmGetPC:
|
||||||
ret
|
ret
|
||||||
|
@ -4,12 +4,12 @@
|
|||||||
|
|
||||||
jp test
|
jp test
|
||||||
|
|
||||||
#include "core.asm"
|
.inc "core.asm"
|
||||||
#include "parse.asm"
|
.inc "parse.asm"
|
||||||
#include "lib/util.asm"
|
.inc "lib/util.asm"
|
||||||
#include "zasm/util.asm"
|
.inc "zasm/util.asm"
|
||||||
#include "lib/parse.asm"
|
.inc "lib/parse.asm"
|
||||||
#include "zasm/parse.asm"
|
.inc "zasm/parse.asm"
|
||||||
|
|
||||||
; mocks. aren't used in tests
|
; mocks. aren't used in tests
|
||||||
zasmGetPC:
|
zasmGetPC:
|
||||||
|
@ -6,12 +6,12 @@
|
|||||||
|
|
||||||
jp test
|
jp test
|
||||||
|
|
||||||
#include "core.asm"
|
.inc "core.asm"
|
||||||
#include "lib/util.asm"
|
.inc "lib/util.asm"
|
||||||
#include "zasm/util.asm"
|
.inc "zasm/util.asm"
|
||||||
#include "zasm/const.asm"
|
.inc "zasm/const.asm"
|
||||||
.equ SYM_RAMSTART RAMSTART
|
.equ SYM_RAMSTART RAMSTART
|
||||||
#include "zasm/symbol.asm"
|
.inc "zasm/symbol.asm"
|
||||||
|
|
||||||
testNum: .db 1
|
testNum: .db 1
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
jp test
|
jp test
|
||||||
|
|
||||||
#include "core.asm"
|
.inc "core.asm"
|
||||||
#include "parse.asm"
|
.inc "parse.asm"
|
||||||
#include "zasm/util.asm"
|
.inc "zasm/util.asm"
|
||||||
|
|
||||||
testNum: .db 1
|
testNum: .db 1
|
||||||
sFoo: .db "foo", 0
|
sFoo: .db "foo", 0
|
||||||
|
@ -50,10 +50,10 @@ chkerr ".equ" 19
|
|||||||
chkerr ".equ foo" 19
|
chkerr ".equ foo" 19
|
||||||
chkerr ".org" 19
|
chkerr ".org" 19
|
||||||
chkerr ".fill" 19
|
chkerr ".fill" 19
|
||||||
chkerr "#inc" 19
|
chkerr ".inc" 19
|
||||||
chkerr "#inc foo" 19
|
chkerr ".inc foo" 19
|
||||||
chkerr "ld a, 0x100" 20
|
chkerr "ld a, 0x100" 20
|
||||||
chkerr ".db 0x100" 20
|
chkerr ".db 0x100" 20
|
||||||
chkerr "#inc \"doesnotexist\"" 21
|
chkerr ".inc \"doesnotexist\"" 21
|
||||||
chkerr "foo:\\foo:" 22
|
chkerr "foo:\\foo:" 22
|
||||||
chkoom
|
chkoom
|
||||||
|
Loading…
Reference in New Issue
Block a user