AppleIIAsm-Collection/source/disk7_convert/T.MAC.CONVERT
nathanriggs c8cac53c5e Rev 0.4 updates
Massive updates that changes the way most subroutines are handled. Major bugfixes, various utilities added, started higher-level libraries.
2019-04-26 18:49:10 -04:00

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
<<<
*