WS@-51 PROGRAMMER’SGUIDEAND INSTRUCTION SET
INSTRUCTION DEFINITIONS
ACALL addrll
Function:
Deaoription:
Example:
Bytw
Cyclw
Encoding:
AbsoluteCall
ACALLunconditionallycalls a subroutinelocatedat the indicatedaddress.The instruction
incrementsthe PC twim to obtain the address of the followinginstruction,then Duaheathe
Id-bitresult ontothe stack (low-orderbyte fret) and incremen~the StackPointer&vice.The
destinationaddress is obtainedby suceesm
“velyconcatenatingthe five high-orderbits of the
incrementedPC opcodebits7-5,andthe secondbyteofthe instruction.Thesubroutinecalled
mustthereforestart withinthe same2K blockofthe programmemoryas the fsrstbyte of the
instrueticmfollowingACALL.No flagsare affected.
InitiallySPequals07H.Thelabel“SUBRTN”is at programmemorylocation0345H. After
executingthe instruction,
ACALL SUBRTN
at location0123H,SP will contain09H,internal IL4M locations08H and 09H will contain
25Hand OIH, respectively,and the PC will contain0345H.
2
2
I
alO a9 a8 1
0001
a7 a6 a5 a4
a3 a2 al aO
ACALL
(PC)- (PC)+ 2
(SP)+ (SP) + 1
((sP)) + (PC74)
(SP)+ (SP) + 1
((SP))- (PC15.8)
(PClo.o)+ page address
2-26