AppleIIAsm-Collection/disks/disk3_math8_math16/T.REQUIRED.MAC
nathanriggs 1b182844cc Math Routines 0.2.0 update
- fixed a plethora of bugs
- overhauled demo
- integrated shared required library and macros
- began early planning of floating-point routines and macros
- created minified, no-comment versions of every routine
2018-12-21 16:47:01 -05:00

95 lines
2.0 KiB
Plaintext

********************************
* *
********************************
*
*``````````````````````````````*
* REQUIRED.MAC *
*- -*
* MACROS USED FOR CORE UTILS *
* AND LIBRARY ROUTINES. NOTE *
* THAT THE LIBRARIES DO NOT *
* USE THESE MACROS, BUT MAY *
* USE THE ROUTINES. THESE ARE *
* MERELY PROVIDED FOR THE SAKE *
* OF CONVENIENCE. *
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
*
*``````````````````````````````*
* _ISLIT: DETERMINES WHETHER A *
* PARAM IS LITERAL OR *
* NOT, AND CHANGES *
* APPROPRIATELY. FOR *
* MACRO USE ONLY. *
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
*
_ISLIT MAC
IF #=]1 ; IF ]1 IS A LITERAL
LDA ]1/$100 ; GET HI
PHA
LDA ]1 ; GET LO
PHA
ELSE ; ]1 IS ADDRESS
LDA ]1+1 ; SO GET HIGH VAL FROM ADDR
PHA
LDA ]1 ; THEN LO VAL
PHA
FIN
<<<
*
*``````````````````````````````*
* _GRET: GET RETURN VALUE *
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
*
_GRET MAC
LDA #>]1
PHA
LDA #<]1
PHA
JSR __GETRET
<<<
*
*``````````````````````````````*
* _SPAR: SET PARAMETER *
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
*
_SPAR MAC
LDA #>]1
PHA
LDA #<]1
PHA
JSR __SETPARM
<<<
*
*``````````````````````````````*
* _DUMP: DUMP DATA *
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
*
_DUMP MAC
LDA #>]1
PHA
LDA #<]1
PHA
LDA ]2
PHA
JSR __DUMP
<<<
*
*``````````````````````````````*
* _PRNT: PRINT STRING *
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
*
_PRNT MAC
JSR __P
ASC ]1
HEX 00
<<<
*
*``````````````````````````````*
* _WAIT: WAIT FOR KEYPRESS *
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
*
_WAIT MAC
JSR __W
<<<
*