-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunstart.asm
More file actions
26 lines (18 loc) · 799 Bytes
/
runstart.asm
File metadata and controls
26 lines (18 loc) · 799 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
; RUNSTART.ASM[REL]
; This code is assembled as a relocatable library and linked at the beginning
; of the program using it. It works with the companion file RUNEND.ASM[REL],
; which has to be linked at the end of the binary.
; Together, these perform initialization tasks for the memory allocator code
; and then jump to the program's entry point, defined as the "main" global
; symbol.
.z80
org 00100h
external runend ; Address of the end of the program
external map_init ; Mapper support initialization
external malloc_init ; Initialize malloc
external main ; Entry point to the program
cseg
runstart: call map_init ; Initialize the mapper support
call malloc_init ; Initialize the malloc routine
jp main
defb "Runtime v0.1/20220126",13,10