home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 4
/
DATAFILE_PDCD4.iso
/
unix
/
unixlib36d
/
src
/
sys
/
s
/
_exec
< prev
next >
Wrap
Text File
|
1994-02-26
|
4KB
|
161 lines
; /* _exec.s (c) Copyright 1990 H.Rogers */
GET @.src.sys.s.asm_dec
AREA |C$$code|,CODE,READONLY
IMPORT |__exret|
IMPORT |__base|
IMPORT |__break|
IMPORT |__exerr|
|__exec_s0|
|__exec_s1|
MOV v1,a1
ADR a1,|__exreg|
STMIA a1,{sl,fp,sp}
MOV a1,#11
ADR a2,|__exec_s4|
MOV a3,#0
MOV a4,#0
SWI &20040
STR a2,[pc,#|__o_exit|-.-8]
LDR a1,[pc,#|__base_ptr|-.-8]
LDR a1,[a1,#0]
STR a1,[pc,#|__base_|-.-8]
LDR a2,[pc,#|__break_ptr|-.-8]
LDR a2,[a2,#0]
STR a2,[pc,#|__break_|-.-8]
LDR a3,[pc,#|__exshift|-.-8]
CMP a3,#0
BEQ |__exec_s3|
ADD a3,a2,a3
SUB a1,a2,a1
ANDS a4,a1,#31
BEQ |__exec_s2_1|
|__exec_s2_0|
LDR ip,[a2,#-4]!
STR ip,[a3,#-4]!
SUB a1,a1,#4
ANDS a4,a1,#31
BNE |__exec_s2_0|
|__exec_s2_1|
CMP a1,#0
BEQ |__exec_s3|
|__exec_s2_2|
LDMDB a2!,{a4,v2,v3,v4,v5,v6,sl,ip}
STMDB a3!,{a4,v2,v3,v4,v5,v6,sl,ip}
SUBS a1,a1,#64
LDMGEDB a2!,{a4,v2,v3,v4,v5,v6,sl,ip}
STMGEDB a3!,{a4,v2,v3,v4,v5,v6,sl,ip}
BGT |__exec_s2_2|
|__exec_s3|
MOV a1,#0
MOV a2,a3
MOV a3,#0
MOV a4,#0
SWI &20040
STR a2,[pc,#|__o_himem|-.-8]
MOV a1,v1
SWI &20005
MOVVC a1,#0
STR a1,[pc,#|__exerr_|-.-8]
|__exec_s4|
MOV a1,#0
LDR a2,[pc,#|__o_himem|-.-8]
MOV a3,#0
MOV a4,#0
SWI &20040
LDR a3,[pc,#|__base_|-.-8]
LDR a1,[pc,#|__break_|-.-8]
LDR a2,[pc,#|__exshift|-.-8]
CMP a2,#0
BEQ |__exec_s6|
ADD a1,a1,a2
ADD a2,a3,a2
SUB a1,a1,a2
ANDS a4,a1,#31
BEQ |__exec_s5_1|
|__exec_s5_0|
LDR ip,[a2],#4
STR ip,[a3],#4
SUB a1,a1,#4
ANDS a4,a1,#31
BNE |__exec_s5_0|
|__exec_s5_1|
CMP a1,#0
BEQ |__exec_s6|
|__exec_s5_2|
LDMIA a2!,{a4,v2,v3,v4,v5,v6,sl,ip}
STMIA a3!,{a4,v2,v3,v4,v5,v6,sl,ip}
SUBS a1,a1,#64
LDMGEIA a2!,{a4,v2,v3,v4,v5,v6,sl,ip}
STMGEIA a3!,{a4,v2,v3,v4,v5,v6,sl,ip}
BGT |__exec_s5_2|
|__exec_s6|
MOV a1,#11
LDR a2,[pc,#|__o_exit|-.-8]
MOV a3,#0
MOV a4,#0
SWI &20040
LDR a1,[pc,#|__exerr_ptr|-.-8]
LDR a2,[pc,#|__exerr_|-.-8]
STR a2,[a1,#0]
ADR a1,|__exreg|
LDMIA a1,{sl,fp,sp}
LDR a1,[pc,#|__exret_ptr|-.-8]
MOV pc,a1
|__o_exit|
DCD 0 ; old Exit Handler
|__o_himem|
DCD 0 ; old HIMEM
|__exret_ptr|
DCD |__exret|
|__base_ptr|
DCD |__base|
|__base_|
DCD 0 ; __base value
|__break_ptr|
DCD |__break|
|__break_|
DCD 0 ; __break value
|__exreg|
% 12 ; sl,fp,sp
|__exerr_ptr|
DCD |__exerr|
|__exerr_|
DCD 0
EXPORT |__exshift|
|__exshift|
DCD 0
|__exec_s7|
EXPORT |__exptr|
|__exptr|
DCD |__exec_s0|
EXPORT |__exlen|
|__exlen|
DCD |__exec_s7|-|__exec_s0|
END