EasyManua.ls Logo

Husky Hunter - Machine Code Calls

Husky Hunter
499 pages
Print Icon
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...
BASIC PROGRAMMING
SECTION 4.8
MACHINE CODE CALLS
4.8 HUNTER is designed to be extremely versatile and flexible in its
use. For some applications it is not possible to perform every
function using pure Basic routines, usually for reasons of
speed. It is possible to write machine code routines in these
situations.
4.8.
1
4.8.2
4,8,3
VER.V09F
Also covered in this section is some general guidelines in the
control of HUNTER by means of PEEK and POKE to specified memory
addresses.
It should be emphasised that the use of features described here
is not recommended for users unfamiliar with computing at
machine code level.
TilE MACHINE CODE
HUNTER uses the CMOS NSC-800 microprocessor, which provides an
instruction set entirely compatible with the popular Z80 micro-
processor. For that reason
it is not proposed to go into detail
about the facilities offered by machine code and users are
referred to any of the standard books which cover the Z80,
It is not recommended, however, that the stack pointer register
(SP) is used in a fashion incompatible with supporting inter-
rupts. Standard use in the form of subroutine CALLs, PUSHs and
?OPs, however, is supported.
BASIC CALL
To execute a machine code program the function:-
CALL(addr)
is used. This will pass control from Basic to the address. A
machine code RET will return the user to Basic.
PASSING SIMPLE PARAMETERS
It is possible to pass information both from Basic to the
'CALLed' program and return the information back to Basic.
NSC-800 is a trademark of National Semiconductor Inc.
Z-80 is a trademark of Zilog Corporation Inc.
PAGE 4 - 17