; If you include these lines in your program, you can easily ; make calls to the routines built-in to PAULMON2. See the ; code below for an example. ; ---------------cut here-------------------------------------- ; Jan 10,1999 modified for Metalink Assembler by W.SIRICHOTE ; JUly 25,1999 add return path addres to monitor ; August 16,1999 add getnum() and _atoi() subroutine phex1 equ 002Eh ;print a single hex digit cout equ 0030h ;Send Acc to serial port cin equ 0032h ;Get Acc from serial port phex equ 0034h ;Print Hex value of Acc phex16 equ 0036h ;Print Hex value of DPTR pstr equ 0038h ;Print string pointed to by DPTR, ;must be terminated by 0 or a high bit set ;pressing ESC will stop the printing ghex equ 003Ah ;Get Hex input into Acc ;Carry set if ESC has been pressed ghex16 equ 003Ch ;Get Hex input into DPTR ;Carry set if ESC has been pressed esc equ 003Eh ;Check for ESC key ;Carry set if ESC has been pressed upper equ 0040h ;Convert Acc to uppercase ;Non-ASCII values are unchanged autobaud equ 0042h ;Initialize serial port pcstr equ 0045h ;print string in compressed format (no docs) newline equ 0048h ;print CR/LF (13 and 10) lenstr equ 004Ah ;return the length of a string @DPTR (in R0) pint8u equ 004Dh ;print Acc at an integer, 0 to 255 pint8 equ 0050h ;print Acc at an integer, -128 to 127 pint16u equ 0053h ;print DPTR as an integer, 0 to 65535 smart_wr equ 0056h ;write Acc @DPTR (RAM or flash), C=1 if error prgm equ 0059h ;write Acc @DPTR to Flash ROM, C=1 if error erall equ 005Ch ;erase the Flash ROM chip, C=1 if error find equ 005Fh ;find next prog header in memory cin_filter equ 0062 ;like cin, but scan for arrow keys, pgup/pgdn asc2hex equ 0065h ;convert character 0-9,A-F to number 0-15. ;**************** my code added in myextra.asm ************************* monitor equ 1954h ; return path to monitor program see myEXTRA.asm getnum equ 19d2h ; return 16-bit integer in BA _atoi equ 19a6h ; r1 pointed to start address of number string