new installation mechanism

This commit is contained in:
ceriel 1991-09-03 15:01:06 +00:00
parent cdd5e62a71
commit fc1615334c
4 changed files with 118 additions and 0 deletions

3
mach/ns/libmon/.distr Normal file
View file

@ -0,0 +1,3 @@
LIST
libmon_s.a
head_em.s

2
mach/ns/libmon/LIST Normal file
View file

@ -0,0 +1,2 @@
libmon_s.a
mon.s

55
mach/ns/libmon/head_em.s Normal file
View file

@ -0,0 +1,55 @@
.define hol0,argv,.reghp,.limhp,envp,begbss
.define .ignmask, .trpreg
.define .stop
.define ERANGE,EILLINS,ECASE
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
topmem = 0xFFFFFF
ERANGE = 1
EILLINS = 18
ECASE = 20
.sect .text
movd begbss, r7
movd endbss, r6
1:
movqd 0, 0(r7)
addqd 4, r7
cmpd r6,r7
bgt 1b
movd envp,tos
movd argv,tos
movd 1,tos
jsr @__m_a_i_n
.stop:
movb 0x7f,tos
jsr @.putchar
bpt
.sect .bss
begbss:
.sect .data
hol0:
.data4 0
.data4 0
argv:
.data4 3f
envp:
.data4 0
3:
.asciz 'PROGRAM'
.reghp:
.data4 endbss
.limhp:
.data4 endbss
.ignmask:
.data2 0
.trpreg:
.data4 0

58
mach/ns/libmon/mon.s Normal file
View file

@ -0,0 +1,58 @@
.define .mon
.sect .text
.sect .rom
.sect .data
.sect .bss
.sect .text
.sect .text
.mon:
cmpd 1,4(sp)
beq 1f
cmpd 3,4(sp)
beq 3f
cmpd 4,4(sp)
beq 4f
cmpd 54,4(sp)
beq 5f
movd .add1, tos
jsr @.prstr
movd 4(sp), tos
jsr @.print
movd .add2, tos
jsr @.prstr
ret 4
1: jump @.stop
3: save [r0,r1,r2,r3]
movd 3,r0
movd 28(sp),r1
movd 32(sp),r2
movd 0,r3
svc
movd r2, 32(sp)
movd 0,28(sp)
restore [r0,r1,r2,r3]
ret 8
4: save [r0,r1,r2,r3]
movd 4,r0
movd 28(sp),r1
movd 32(sp),r2
movd 0,r3
svc
movd r2, 32(sp)
movd 0,28(sp)
restore [r0,r1,r2,r3]
ret 8
5: movd 0, 16(sp)
ret 12
.sect .data
.add1: .asciz "monitor call "
.add2: .asciz " not implemented\n"
.align