mirror of
https://github.com/antoinevignau/source.git
synced 2025-01-20 02:30:40 +00:00
1 line
14 KiB
ArmAsm
1 line
14 KiB
ArmAsm
|
load 'macros.dump'
include 'driver.equ'
;-----------------------------------------------
;
; Imported addresses
;
;-----------------------------------------------
IMPORT D_AlertBox
IMPORT D_Deref
IMPORT T_Ascent
IMPORT T_Descent
IMPORT T_Length
IMPORT T_LineCount
IMPORT T_LineInfoSize
IMPORT T_LineWidth
IMPORT T_LinesHdl
IMPORT T_ObjHdl
IMPORT T_Offset
IMPORT T_ParHeight
IMPORT T_ParInfoSize
IMPORT T_ParOffset
IMPORT T_ParStart
IMPORT T_RulerHdl
IMPORT T_TextBlock
IMPORT D_UseStdColors
;-----------------------------------------------
;
; Forward addresses and entries
;
;-----------------------------------------------
ENTRY CancelItem
ENTRY PAItem1
ENTRY PAItem2
ENTRY PAItem3
ENTRY PAItem4
ENTRY PAItem5
ENTRY PAItem6
ENTRY PAString1
ENTRY PAString2
ENTRY PAString3
ENTRY PAString4
ENTRY PAString5
ENTRY PAString6
ENTRY PBItem2
ENTRY PBItem3
ENTRY PBItem4
ENTRY PBItem5
ENTRY PBItem6
ENTRY PBString2
ENTRY PBString3
ENTRY PBString4
ENTRY PBString5
ENTRY PBString6
ENTRY PCItem1
ENTRY PCItem10
ENTRY PCItem2
ENTRY PCItem3
ENTRY PCItem4
ENTRY PCItem5
ENTRY PCItem6
ENTRY PCItem7
ENTRY PCItem8
ENTRY PCItem9
ENTRY PCString1
ENTRY PCString10
ENTRY PCString2
ENTRY PCString3
ENTRY PCString4
ENTRY PCString5
ENTRY PCString6
ENTRY PCString7
ENTRY PCString8
ENTRY PCString9
ENTRY PDItem10
ENTRY PDItem3
ENTRY PDItem4
ENTRY PDItem5
ENTRY PDItem6
ENTRY PDItem7
ENTRY PDItem8
ENTRY PDItem9
ENTRY PDString10
ENTRY PDString3
ENTRY PDString4
ENTRY PDString5
ENTRY PDString6
ENTRY PDString7
ENTRY PDString8
ENTRY PDString9
ENTRY String1
ENTRY String2
ENTRY String3
ENTRY String4
ENTRY String5
ENTRY String6
ENTRY String7
ENTRY String8
ENTRY String9
ENTRY TItem1
ENTRY TItem2
ENTRY TItem3
ENTRY TItem4
ENTRY TItem5
ENTRY TItem6
ENTRY TItem7
ENTRY TItem8
ENTRY T_CancelStr
ENTRY T_LineAlert
ENTRY T_ParagAlert
ENTRY T_Str
;KEEP obj/tdbg
INCLUDE 'mac/tdbg.mac'
;----------------------------------------------------------------------
; T_NumbAlert (Numb:word)
;
T_NumbAlert PROC EXPORT
;Using T_DebugData
INPUT Numb:w
BEGIN +b
spacelong
_GetPort
pushword Numb
pushlong #T_Str+1
pushword #6
pushword #0
_Int2Dec
spaceword
pushword #1
pushlong #T_Str
jsl D_UseStdColors
jsl D_AlertBox
pla
_SetPort
RETURN
ENDP
;-------------------------------------------------------------------------------
;
; T_DebugTextObj (ObjHdl:l)
;
T_DebugTextObj PROC EXPORT
;Using P_ObjData
;Using P_Data
INPUT ObjHdl:l
LOCAL ObjPtr:l,PrevObject:l
BEGIN
Loop movelong [ObjHdl],ObjPtr
movelong [ObjPtr]:#P_PThread,PrevObject
cpzl PrevObject
beq AtStart
movelong PrevObject,ObjHdl
bra Loop
AtStart
Loop2 cpzl ObjHdl
beq Exit
movelong [ObjHdl],ObjPtr
pushword [ObjPtr]:#P_StartParag
jsl T_NumbAlert
pushword [ObjPtr]:#P_StartLine
jsl T_NumbAlert
pushword [ObjPtr]:#P_EndParag
jsl T_NumbAlert
pushword [ObjPtr]:#P_EndLine
jsl T_NumbAlert
movelong [ObjPtr]:#P_NThread,ObjHdl
bra Loop2
Exit RETURN
ENDP
;-----------------------------------------------------------------------------
;
; T_DebugLines (LinePtr:l,LineCount:w)
;
T_DebugLines PROC EXPORT
;Using T_Data
;Using T_DebugData
;Using T_TextEqu
INPUT LinePtr:l,LineCount:w
LOCAL CurLine:w
BEGIN +b
stz CurLine
Loop
inc CurLine
pushword [LinePtr]:#T_Offset
pushlong #PBString2+1
pushword #6
pushword #0
_Int2Dec
pushword [LinePtr]:#T_Length
pushlong #PBString3+1
pushword #6
pushword #0
_Int2Dec
pushword [LinePtr]:#T_LineWidth
pushlong #PBString4+1
pushword #6
pushword #0
_Int2Dec
moveword [LinePtr]:#T_Ascent,a
and #$ff
pha
pushlong #PBString5+1
pushword #6
pushword #0
_Int2Dec
moveword [LinePtr]:#T_Descent,a
and #$ff
pha
pushlong #PBString6+1
pushword #6
pushword #0
_Int2Dec
spaceword
pushlong #T_LineAlert
pushlong #0
_Alert
pla
cmp #1
bne Exit
cmpw CurLine,LineCount
bge Exit
addwl #T_LineInfoSize,LinePtr
brl Loop
Exit RETURN
|