Section 5 – Disassemblers - HP 48gII Advanced User's Reference Manual

Graphing calculator
Hide thumbs Also See for 48gII:
Table of Contents

Advertisement

D0=C
LC FFFFEFFF D=C.W
LC 4F R3=C.B
{
C=0.W LC 1800 C=-C.W B=C.W % B=X=-1.5
LC 82
A=0.S A+1.S
{
RSTK=C
LC 80100 ARMSAT
?ST=0.0
{
C=DAT0.S C-A.S DAT0=C.S
}
A+A.S SKNC { D0+1 A+1.S } % next pixel
C=0.W LC 40 B+C.W
C=RSTK C-1.B UPNC
}
D0+2
C=0.W LC 66 D+C.W
C=R3.W C-1.B R3=C.W UPNC
}
LC FF OUT=C { C=IN2 ?C=0.B UP }
{ C=IN2 ?C#0.B UP }
INTON
LC 10 SETLNED
SCREEN CD0EX D0=00120 DAT0=C.A
LOADRPL
ENDCODE
;
@"
Section 5 – Disassemblers
ASM
The ASM-> disassembler converts Saturn assembly into a source string.
The syntax used is MASD syntax, in mode 0-15.
Each line contains an address and an instruction.
If the system flag -71 is set (with
this case, the resulting source may be then reassembled if needed.
ASM-> can either disassemble a CODE object or the memory area between 2 given addresses (as binary
integer)
Example:
AE734 GOSBVL 0679B
AE73B LC 01000
AE742 C-A A
AE744 GONC AE742
AE747 GOVLNG 138B9
6-34 The Development Library
% D0 points to that memory
% D=Y=-1
% loop 80 times
% loop 131 times
% set bit 0 in As
% save loop counter in RSTK
% evaluate the ARM code
% if point is in the set, do nothing
% else, turn the pixel off
% increment X
% count down and loop
% next graphic line
% increment Y
% count down and loop
% wait for no key down
% Wait for 1 key down
% restore the keyboard interrupt
% restore the header size
% restore the screen pointer
% return to RPL
( end of ASM program )
( end of RPL program )
), addresses are not shown, except for the destinations of jumps. In
-71 SF
(default)
-71 CF2
-71 SF2
GOSBVL 0679B
LC 01000
*AE742
C-A A
GONC AE742
GOVLNG 138B9

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

49g+

Table of Contents