32 lines
841 B
NASM
32 lines
841 B
NASM
; debug-entry.asm -- M8.2 multi-TU debug gate entry, linked at bit 018A0000.
|
|
;
|
|
; debug-a.o is linked first and debug-b.o second, so debug_a_mul is the text
|
|
; origin function (DWARF low PC 0x314000), debug-b's functions are at nonzero
|
|
; text offsets, and _start follows both TUs. The entry calls all four
|
|
; functions and stores their results (22, 14, 9, 36) at 018A8000, 018A8020,
|
|
; 018A8040 and 018A8060; debug-multi-check.lua reads them after the stripped
|
|
; image loads.
|
|
.ref _debug_a_mul
|
|
.ref _debug_a_add
|
|
.ref _debug_b_sub
|
|
.ref _debug_b_mul
|
|
.text
|
|
.globl _start
|
|
_start:
|
|
setf 16,1,0
|
|
setf 32,0,1
|
|
movi _cstack,a14
|
|
move a14,a13
|
|
calla _debug_a_mul
|
|
move a8,@018A8000h,1
|
|
calla _debug_a_add
|
|
move a8,@018A8020h,1
|
|
calla _debug_b_sub
|
|
move a8,@018A8040h,1
|
|
calla _debug_b_mul
|
|
move a8,@018A8060h,1
|
|
rets
|
|
|
|
.bss _cstack,32768,16
|
|
.end
|