home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_progs
/
miscutil
/
xplor.lzh
/
XPLOR
/
MACROS.BASIC
next >
Wrap
Text File
|
1991-08-16
|
3KB
|
85 lines
*--------------------------------------------------------------
* Common MACROs that should be called for any and all programs
*
* Include macros.opt for optional MACRO and subroutine calls.
*--------------------------------------------------------------
*--------------------------------------------------------------
* use - sets a variable that will be checked when "macros.opt"
* is included. This allows selective inclusion of MACROs
* and subroutines contained in "macros.opt".
*--------------------------------------------------------------
use MACRO
\1 SET 1
ENDM
*****************************************************************
* Currently defined names for MACROs and subroutines for "use".
*
* ---------------------------------------------------------------
* NAME | Routine(s) included
* ---------------------------------------------------------------
* b2h | binhex -- convert binary longword to ASCII hex string.
* |
* copy | copyb -- memory to memory byte copy
* |
* dbug | regdump -- Dump registers to data area in hex ASCII
* | shoregs -- Print register dump area
* |
* ins | instr -- Find occurence of string in another string.
* |
* leadspc| ldspc -- Replace leading zeros in string with spaces.
* |
* libs | openlib -- opens a library
* | closelib -- closes a library
* | setlib -- Library pointer to A6
* | dolibs -- Open all libraries specified by USE
* |
* prt | print -- print string to screen
* |
* scm | strcmp -- compare 2 strings
* |
* sln | strlen -- find length of a string
******************************************************************
*--------------------------------------------------------------
* call - allows use of system calls (library subroutines)
* without having to type _LVO all the time.
*--------------------------------------------------------------
call MACRO
jsr _LVO\1
ENDM
*--------------------------------------------------------------
* XTRN - Same reason as above. I hate unnecessary typing!
*--------------------------------------------------------------
XTRN MACRO
XREF _LVO\1
ENDM
*--------------------------------------------------------------
* PUSHes and POPs - For a more intuitive and easy to type
* stack operation.
*--------------------------------------------------------------
pushw MACRO
move.w \1,-(sp) ;push a word onto stack
ENDM
pushl MACRO
move.l \1,-(sp) ;push a longword onto stack
ENDM
popw MACRO
move.w (sp)+,\1 ;pop a word from stack
ENDM
popl MACRO
move.l (sp)+,\1 ;pop a longword from stack
ENDM
*--------------------------------------------------------------