EasyManua.ls Logo

HP 48GII - Page 504

HP 48GII
653 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
6-18 The Development Library
Using SKELSE, SKEC, SKENC, SKLSE instructions, two blocks create an IFNOT-THEN-ELSE structure.
These instructions
Are equivalent to Or in high-level language
bB[8dB!Dr62
P<D!
f!
!!<T6:!
!!52!
h!
Dr<ED<!
f!
!!B'3dB!
!!<T6:!
!!52!
h!
bB[8dB!>LP<DdS)mH!
.dS)m3!
!!>L:Ld<G(H!{!$G(!Gkp!<G(3
!!>L:LdS)m3!
.d<G(3!
>L:Ld<G(H!
.dS)mH!
!!B'3dB!
!!>L:Ld<G(H!
!!>L:LdS)mH!
.d<G(H!
67!=L:!B[8!:;<=!
!!S<>6=!
!!!!ddd!
!!!!ddd!
!!<=4!
<ED<!
!!S<>6=!
!!!!ddd!
!!!!ddd!
!!!!ddd!
!!<=4!
Note: SKELSE places a GOTO between the 2 blocks, SKEC places a GOC, SKENC a GONC and SKLSE places
nothing.
Notes:
52s are compiled directly when encountered while!<T6:Z and block openings are compiled later on. You can not
have more than 64 pending EXITs and block openings simultaneously.
4.2.3 Tests
A test instruction (bB[8dB) may be followed by:
A
>LP<D!E$%)u, !E$%)u or!09!E$%)u instruction
A -> { or { instruction. In this case, the test is inverted and a skip block is open.
A
!K:P or K:=P<D instruction.
A
Dr62P<D!f or f instruction. In this case, a skip block is open.
A
>L:L,!>L:LE, >LNE=>,!>LD5S,!>LD5SE!or!>LDSNE. In this case, the test is inverted and a proper
jump instruction is generated (ie:
bB[SdB!>L:L!B is compiled as bBgSdB!f!>L:L!B!h.
A
<T6: or!52.
4.2.4 Saturn instructions syntax
In this section:
x is a decimal number between 1 and 16. An expression can be used if its value can be determined at the first
encounter.
h is a hexadecimal digit.
a is a decimal number ranging from 1 to 16 or a 0 to 15 number depending of the current mode (0-15 or 1-16). An
expression can be used, if it’s value can be determined at the first encounter.
f is a field A, B, X, XS, P, WP, M, S, F1, F2, F3, F4, F5, F6 or F7.
Reg is a working register A, B, C or D.
RReg is a scratch register R0, R1, R2, R3 or R4.
Exp is an expression.
Cst is a decimal constant. An expression can be used if its value can be determined at the first encounter.
DReg is a pointer register D0 or D1.
Data is memory data pointed by D0 or D1. It means
!4B:8 or!4B:3.
Note: For instructions that use two working registers, instruction using the pairs A-B, B-C, C-D and A-C are smaller
and faster (if the
7G fields are not used).
For instructions like Reg1=Reg1… you can write only Reg1… Example:
!B[B'OdB is the same as B'OdB.

Table of Contents

Other manuals for HP 48GII

Related product manuals