* *``````````````````````````````* * HEAD.REQUIRED * * * * THIS HEADER MUST BE THE * * INCLUDED BEFORE ANY OTHER * * CODE IN ORDER FOR THE PROPER * * FUNCTIONING OF ANY LIBRARY. * * * * AUTHOR: NATHAN RIGGS * * CONTACT: NATHAN.RIGGS@ * * OUTLOOK.COM * * * * DATE: 29-NOV-2019 * * ASSEMBLER: MERLIN 8 PRO * * OS: DOS 3.3 * * * * BYTES: 311 * *,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,* * * VARIABLE DECLARATIONS ******** * ** JUMP TABLE SETUP. THIS IS FOR LOADING ** SUBROUTINES INTO MEMORY FOR ACCESS BY ** EXTERNAL EXECUTIONS. NOTE THAT THIS ** SHOULD ALWAYS START AT SECOND BYTE OF ** CODE IN THE PROGRAM SO THAT ITS ** LOCATION IN MEMORY IS EASILY KNOWN. * JUMPTBL JMP MAIN_START ; ** ALWAYS ** START WITH ; JUMP TO MAIN_START DS 32 ; 16 MORE ENTRIES * ** 20 BYTES FOR VARIABLES * VARTAB DS 20 * ** 256 BYTES DEDICATED TO RETURN ** VALUES OF VARIABLE LENGTH; CAN BE ** MODIFIED TO SUIT SMALLER OR LARGER ** NEEDS. * RETLEN DS 1 ; RETURN VALUE BYTE LENGTH RETURN DS 255 * ** ADDRESS STORAGE LOCATIONS FOR ** INDIRECT ADDRESSING. * ADDR1 EQU $06 ; AND $07 ADDR2 EQU $08 ; AND $09 ADDR3 EQU $EB ; AND $EC ADDR4 EQU $ED ; AND $EE * ** SCRATCHPAD ZERO PAGE LOCATIONS AND ** DEDICATED ZERO PAGE ADDRESS TO HOLD ** A RETURN ADDRESS PASSED VIA THE STACK * SCRATCH EQU $19 ; USED TO BACKUP .Y SCRATCH2 EQU $1E RETADR EQU $FE ; AND $FF * ** ZERO PAGE ADDRESSES DEDICATED TO PASSING ** BACK RESULTS WHEN THERE ARE MORE THAN ** THREE BYTES BEING PASSED (AXY) AND THE ** USE OF THE STACK IS IMPRACTICAL OR TOO SLOW * RESULT EQU $FA RESULT2 EQU $FC * ** WORD AND BYTE PARAMETER SPACE USED ** BY APPLEIIASM MACROS * WPAR1 EQU $FA WPAR2 EQU $FC WPAR3 EQU $FE BPAR1 EQU $EF BPAR2 EQU $E3 BPAR3 EQU $1E BPAR4 EQU $19 * ** VARIOUS HOOKS USED BY ALL ROUTINES * REENTRY EQU $3D0 * PROMPT EQU $33 ; DOS PROMPT CHARACTER COLDENT EQU $03D3 ; COLD ENTRY TO DOS SRESET EQU $03F2 ; SOFT RESET PRNTAX EQU $F941 ; PRINT HEX VALS OF A,X REGISTERS BELL EQU $FBE4 ; RING MY BELL IOSAVE EQU $FF4A ; SAVE CURRENT STATE OF REGISTERS IOREST EQU $FF3F ; RESTORE OLD STATE OF REGISTERS * BITON0 EQU $01 ; FOR AND MASKING BITON1 EQU $02 ; TO CHECK IF BIT IS ON BITON2 EQU $04 BITON3 EQU $08 BITON4 EQU $10 BITON5 EQU $20 BITON6 EQU $40 BITON7 EQU $80 * MAIN_START