-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhelp.asm
More file actions
99 lines (82 loc) · 2.17 KB
/
Copy pathhelp.asm
File metadata and controls
99 lines (82 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
; help.asm: help command for the shell
; To install:
; Build into a bare assembled binary
; Pretend it's a disk image and load it into your emulator
; Image it to a file in BBFS
; load it by typing its name
; TODO: need a way to make the build system dump this into a BBFS image, or to
; automate those actions.
.org 0
#include "bbos.inc.asm"
define WRITE_STRING 0x1004
SET PUSH, str_help00
SET PUSH, 1 ; With newline
SET A, WRITE_STRING
INT BBOS_IRQ_MAGIC
ADD SP, 2
SET PUSH, str_help01
SET PUSH, 1 ; With newline
SET A, WRITE_STRING
INT BBOS_IRQ_MAGIC
ADD SP, 2
SET PUSH, str_help02
SET PUSH, 1 ; With newline
SET A, WRITE_STRING
INT BBOS_IRQ_MAGIC
ADD SP, 2
SET PUSH, str_help03
SET PUSH, 1 ; With newline
SET A, WRITE_STRING
INT BBOS_IRQ_MAGIC
ADD SP, 2
SET PUSH, str_help04
SET PUSH, 1 ; With newline
SET A, WRITE_STRING
INT BBOS_IRQ_MAGIC
ADD SP, 2
SET PUSH, str_help05
SET PUSH, 1 ; With newline
SET A, WRITE_STRING
INT BBOS_IRQ_MAGIC
ADD SP, 2
SET PUSH, str_help06
SET PUSH, 1 ; With newline
SET A, WRITE_STRING
INT BBOS_IRQ_MAGIC
ADD SP, 2
SET PUSH, str_help07
SET PUSH, 1 ; With newline
SET A, WRITE_STRING
INT BBOS_IRQ_MAGIC
ADD SP, 2
SET PUSH, str_help08
SET PUSH, 1 ; With newline
SET A, WRITE_STRING
INT BBOS_IRQ_MAGIC
ADD SP, 2
SET PUSH, str_help09
SET PUSH, 1 ; With newline
SET A, WRITE_STRING
INT BBOS_IRQ_MAGIC
ADD SP, 2
SET PUSH, str_help10
SET PUSH, 1 ; With newline
SET A, WRITE_STRING
INT BBOS_IRQ_MAGIC
ADD SP, 2
; Return to the shell if applicable
IFN SP, 0x0000
SET PC, POP
str_help00: .asciiz "DC-DOS is a disk operating "
str_help01: .asciiz "system for DCPU16-based systems."
str_help02: .asciiz " "
str_help03: .asciiz "Builtins: DIR COPY DEL IMAGE VER"
str_help04: .asciiz "LOAD FORMAT "
str_help05: .asciiz " "
str_help06: .asciiz "Additional commands can be "
str_help07: .asciiz "loaded from .IMG files on disk. "
str_help08: .asciiz "Images are loaded at address 0. "
str_help09: .asciiz "Use 'image B FILE.IMG' to image "
str_help10: .asciiz "the disk in drive B for loading."
; Terminate with at least a sector of zeroes so the imager knows to stop imaging
.RESERVE 1024