16 bit Assembly
Home Site Map Instruction Index
The CALL instruction is used to pass control to a sub routine.
The memory address of the destination is supplied in the operand.
This command has 2 parts, Instruction, then either a Register, Immediate value, Label, Routine Name or a memory address.
Examples show how to call a sub routine at:
000007D4 SubPressAnyKey:
Assembly Sample | Description | 16 bit Machine Code |
---|---|---|
CALL 0x07D4 | ; Call using an immediate memory address | E8 D4 07 |
CALL SubPressAnyKey | ; Call using a routine name or label | E8 A2 06 |
MOV BX, 0x0020 | ; Assign a memory location | BB 20 00 |
MOV [BX], 0x07D4 | ; Assign a valid sub routine address | C7 07 D4 07 |
CALL [BX] | ; Call using a direct memory address | FF 17 |