-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinit.asm
More file actions
35 lines (26 loc) · 934 Bytes
/
init.asm
File metadata and controls
35 lines (26 loc) · 934 Bytes
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
;;; init = calls the kernel to make new processes for each of the remaining executable images.
;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Terri-Anne Hultum && Connor Bottum ;;;
;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.Code
;;; The entry point.
__start:
ADDUS %G0 0 9 ;show that this is a SYSCALL, not an error
ADDUS %G1 0 1 ;show that this SYSC is for an IMAGE_COUNT
SYSC ;now %G0 will hold the number of ROMs
COPY %G3 %G0
;; now we have the nuber of ROMS, start all the processses
not_done:
BEQ +done %G3 0
ADDUS %G0 0 9 ;show that this is a SYSCALL, not an error
ADDUS %G1 0 2 ;show that this SYSC is for an EXECUTE
ADDUS %G2 0 %G3 ;show that we want to execute this exectuable ROM beyond the first three.
SYSC
SUBUS %G3 %G3 1
JUMP +not_done
done:
ADDUS %G0 0 9 ;show that this is a SYSCALL, not an error
ADDUS %G1 0 3 ;show that this SYSC is for an EXIT
SYSC
.Numeric
heya: 0xca11ed