improve debug to accpet new lines
Dreglor,
I would like also such a feature : splitted strings and an hexdump output ...
Here is what I am using until it exists :
I would like also such a feature : splitted strings and an hexdump output ...
Here is what I am using until it exists :
Code: Select all
;
; HexDump for debugger
;
Procedure DebugSplittedString(String.s, Length.l)
For i = 1 To Len(String)
Debug Str(i) + " : " + Mid(String, i, Length)
i + Length - 1
Next
EndProcedure
Procedure HexDump(Address.l, Length.l, Width.l)
Debug "***** HexDump : " + Hex(Address) + " rendering " + Hex(Length) + " bytes"
*Buffer = AllocateMemory(Length)
CopyMemory(Address, *Buffer, Length)
For i = 0 To Length - 1
If PeekB(*Buffer + i) < ' '
PokeB(*Buffer + i, ' ')
EndIf
Next
For i = 0 To Length - 1
a$ = ""
For j = i To i + Width - 1
a$ = a$ + RSet(Hex(PeekB(Address + j) & $FF), 2, "0") + " "
Next
Debug RSet(Hex(Address + i), 8, "0") + " | " + a$ + " - " + PeekS(*Buffer + i, Width)
i + Width - 1
Next
EndProcedure
;
; Generate a randomly filled string
;
a$ = "The quick brown fox jumps over the lazy dog ... "
a$ = a$ + a$
a$ = a$ + a$
Debug a$
HexDump(@a$, Len(a$), 32)
DebugSplittedString(a$, 40)
End
My avatar is a small copy of the 4x1.8m image I created and exposed at 'Le salon international du meuble à Paris' january 2004 in Matt Sindall's 'Shades' designers exhibition. The original laminated print was designed using a 150 dpi printout.