CosmOS pre-alpha and launchable application versions of old programs.
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
; A program meant to be loaded off a disk rather than booted from.
|
||||
;
|
||||
; It is assembled for where it will live. Reserving the front of each segment puts the
|
||||
; first thing in it at a known address, and everything after that follows, so the labels
|
||||
; inside are already right for the place the loader will put it. Nothing relocates
|
||||
; anything: this works because the addresses here and the addresses in its header say the
|
||||
; same thing.
|
||||
; It is assembled for where it will live. Giving each segment a base says where it goes,
|
||||
; so the labels inside are already right for the place the loader will put it, and the
|
||||
; assembler writes it out as a loadable program rather than as a boot image. Nothing
|
||||
; relocates anything: this works because the addresses here and the addresses in its
|
||||
; header say the same thing.
|
||||
;
|
||||
; The loader keeps below both of these, which is the whole of the arrangement.
|
||||
|
||||
#Program
|
||||
|
||||
#Reserve 0x2000 ; This program's code lives from 0x2000.
|
||||
#Base 0x2000 ; This program's code lives from 0x2000.
|
||||
|
||||
hello:
|
||||
SETD.0 HelloText
|
||||
@@ -27,7 +27,7 @@ helloDone:
|
||||
|
||||
#Data
|
||||
|
||||
#Reserve 0x1000 ; And its data from 0x1000.
|
||||
#Base 0x1000 ; And its data from 0x1000.
|
||||
|
||||
HelloText:
|
||||
"loaded off a disk, with a string and a loop of its own"
|
||||
|
||||
Reference in New Issue
Block a user