mirror of
https://github.com/nathanriggs/AppleIIAsm-Collection.git
synced 2024-12-02 12:52:03 +00:00
163 lines
4.4 KiB
Plaintext
163 lines
4.4 KiB
Plaintext
|
*
|
||
|
*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*
|
||
|
* *
|
||
|
* CONVERT.MAC *
|
||
|
* *
|
||
|
* AUTHOR: NATHAN RIGGS *
|
||
|
* CONTACT: NATHAN.RIGGS@ *
|
||
|
* OUTLOOK.COM *
|
||
|
* *
|
||
|
* VERSION: 0.4.0 *
|
||
|
* DATE: 05-FEB-2019 *
|
||
|
* ASSEMBLER: MERLIN 8 PRO *
|
||
|
* OS: DOS 3.3 *
|
||
|
* LICENSE: APACHE 2.0 *
|
||
|
* *
|
||
|
*------------------------------*
|
||
|
* *
|
||
|
* *
|
||
|
*------------------------------*
|
||
|
* *
|
||
|
* LIST OF MACROS *
|
||
|
* *
|
||
|
* INTASC : HEX TO INTEGER *
|
||
|
* ASCII STRING *
|
||
|
* *
|
||
|
* ASCINT : ASCII INT STRING TO *
|
||
|
* EQUIVALENT NUMBER *
|
||
|
* *
|
||
|
* HEXASC : HEX TO HEX ASCII *
|
||
|
* STRING *
|
||
|
* *
|
||
|
* ASCHEX: ASCII HEX STRING TO *
|
||
|
* EQUIVALENT NUMBER *
|
||
|
* *
|
||
|
* BINASC : HEX TO BINARY ASCII *
|
||
|
* STRING *
|
||
|
* *
|
||
|
* ASCBIN : BINARY STRING TO *
|
||
|
* EQUIVALENT NUMBER *
|
||
|
* *
|
||
|
* ZTRSTR : ZERO-MARKED STRING *
|
||
|
* TO REGULAR STRING *
|
||
|
* *
|
||
|
*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*
|
||
|
*
|
||
|
*``````````````````````````````*
|
||
|
* INTASC : INTEGER TO STRING *
|
||
|
*- -*
|
||
|
* CONVERTS A 16BIT NUMBER TO *
|
||
|
* ITS STRING EQUIVALENT. *
|
||
|
*- -*
|
||
|
* PARAMETERS: *
|
||
|
* *
|
||
|
* ]1 = VALUE TO CONVERT *
|
||
|
*- -*
|
||
|
* SAMPLE USAGE: *
|
||
|
* TOSTR #11111 *
|
||
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
||
|
*
|
||
|
INTASC MAC
|
||
|
_ISLIT ]1
|
||
|
JSR HEX2INTASC
|
||
|
<<<
|
||
|
*
|
||
|
*``````````````````````````````*
|
||
|
* ASCINT : STRING TO HEXNUM *
|
||
|
*- -*
|
||
|
* CONVERTS A STRING TO A 16BIT *
|
||
|
* NUMBER EQUIVALENT; RETURNS *
|
||
|
* VALUE IN Y(LOW) AND X(HIGH) *
|
||
|
*- -*
|
||
|
* PARAMETERS: *
|
||
|
* *
|
||
|
* ]1 = ADDR TO STORE VALUE *
|
||
|
*- -*
|
||
|
* SAMPLE USAGE: *
|
||
|
* TONUM ????????????? *
|
||
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
||
|
*
|
||
|
ASCINT MAC
|
||
|
_ISSTR ]1
|
||
|
JSR INTASC2HEX
|
||
|
<<<
|
||
|
*
|
||
|
*``````````````````````````````*
|
||
|
* HEXASC : HEX TO HEX STRING *
|
||
|
*- -*
|
||
|
* CONVERTS A HEX BYTE INTO AN *
|
||
|
* EQUIVALENT STRING IN HEX. *
|
||
|
*- -*
|
||
|
* PARAMETERS: *
|
||
|
* *
|
||
|
* ]1 = ADDR TO STORE VALUE *
|
||
|
*- -*
|
||
|
* SAMPLE USAGE: *
|
||
|
* TONUM ????????????? *
|
||
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
||
|
*
|
||
|
HEXASC MAC
|
||
|
_ISLIT ]1
|
||
|
JSR HEX2HEXASC
|
||
|
<<<
|
||
|
*
|
||
|
*``````````````````````````````*
|
||
|
* ASCHEX : HEX STRING TO HEX *
|
||
|
*- -*
|
||
|
* CONVERTS A HEX STRING TO ITS *
|
||
|
* EQUIVALENT BYTE NUMBER. *
|
||
|
*- -*
|
||
|
* PARAMETERS: *
|
||
|
* *
|
||
|
* ]1 = ADDR TO STORE VALUE *
|
||
|
*- -*
|
||
|
* SAMPLE USAGE: *
|
||
|
* TONUM ????????????? *
|
||
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
||
|
*
|
||
|
ASCHEX MAC
|
||
|
_ISSTR ]1
|
||
|
JSR HEXASC2HEX
|
||
|
<<<
|
||
|
*
|
||
|
*``````````````````````````````*
|
||
|
* BINASC : HEX VALUE TO *
|
||
|
* BINARY STRING. *
|
||
|
*- -*
|
||
|
* CONVERTS A HEX VALUE TO ITS *
|
||
|
* EQUIVALENT BINARY STRING. *
|
||
|
*- -*
|
||
|
* PARAMETERS: *
|
||
|
* *
|
||
|
* ]1 = ADDR TO STORE VALUE *
|
||
|
*- -*
|
||
|
* SAMPLE USAGE: *
|
||
|
* TONUM ????????????? *
|
||
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
||
|
*
|
||
|
BINASC MAC
|
||
|
_ISLIT ]1
|
||
|
JSR HEX2BINASC
|
||
|
<<<
|
||
|
*
|
||
|
*``````````````````````````````*
|
||
|
* ASCBIN : BINARY STRING *
|
||
|
* TO HEX VALUE. *
|
||
|
*- -*
|
||
|
* CONVERTS A BINARY STRING TO *
|
||
|
* EQUIVALENT HEX VALUE. *
|
||
|
*- -*
|
||
|
* PARAMETERS: *
|
||
|
* *
|
||
|
* ]1 = ADDR TO STORE VALUE *
|
||
|
*- -*
|
||
|
* SAMPLE USAGE: *
|
||
|
* TONUM ????????????? *
|
||
|
*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*
|
||
|
*
|
||
|
ASCBIN MAC
|
||
|
_ISSTR ]1
|
||
|
JSR BINASC2HEX
|
||
|
<<<
|
||
|
*
|