;I/O PORTS FOR PX-8 DEF ICRL_C=0 ;Read: Input Capture Register Low and Command trigger ; reading will capture current value in free running counter DEF CTRL1 =0 ;Write: Control Register 1 DEF BANK_SELECT=00000001b DEF ROM_BANK=0 DEF RAM=BANK=1 DEF BAR_CODE_MODE1=00000010b DEF ON_FALLING=1 DEF NOT_ON_FALLING=0 DEF BAR_CODE_MODE2=00000100b DEF ON_RISING=1 DEF NOT_ON_RISING=0 DEF BAR_CODE_POWER=00001000b DEF OFF=0 DEF ON=1 DEF BAUD_RATE_SELECT=11110000b DEF BAUD_110=00000000b DEF BAUD_150=00010000b DEF BAUD_300=00100000b DEF BAUD_600=00110000b DEF BAUD_1200=01000000b DEF BAUD_2400=01010000b DEF BAUD_4800=01100000b DEF BAUD_9600=01110000b DEF BAUD_19.2K=10100000b DEF BAUD_1200_75=10000000b DEF BAUD_75_1200=00010000b DEF ICRH_C=1 ;Read: Input Capture Register High byte of free running counter DEF CMDR =1 ;Write: 6301 Command Register DEF SET_RDYSIO=00000001b ;Signal 6301 to accept input DEF RESET_RDYSIO=00000010b ;Signal 6301 done DEF RESET_FRC_OVERFLOW=00000100b ;Reset Free Running Counter Overflow DEF ICRL_B=2 ;Read: Input Capture Register Low for Bar Code DEF CTRL2 =2 ;Write: Control Register 2 DEF SET_LED_0=00000001b DEF SET_LED_1=00000010b DEF SET_LED_2=00000100b DEF RS232C_POWER=00001000b DEF RS232C_INHIBIT=00010000b;No output while turning off DEF RS232C_RX_ENABLE=00100000b;Disable for modem DEF ICRH_B=3 ;Read Capture Register High for Bar Code DEF ISR =4 ;Read Interrupt Status Register 1=>interrupt DEF INT0_7508= 00000001b DEF INT1_8251_RXRDY=00000010b DEF INT2_RS232C_CD= 00000100b DEF INT3_FRC_TO_ICR_B=00001000b DEF INT4_FRC_OVERFLOW=00010000b DEF INT5_EXTERNAL= 00100000b DEF IER =4 ;Write: Interrupt Enable Register 1=>enabled DEF STR =5 ;Read: Status Register DEF BANK_STATUS=00000001b; 0=>ROM 1=>RAM DEF BAR_CODE_DATA=00000010b; 0=>Low 1=>High DEF RDY_7508_IN= 00000100b DEF RDYSIO_7508= 00001000b; 1=>R/W to SIOR enabled DEF SIOR =6 ;Read/Write: 8 bits from/to 7508 DEF DDR_DWR=0Ch ;Read/Write: 8 bits data from/to 8251 DEF CSR_CCR=0Dh ;Read/Write: 8 bits status/command for 8251 DEF PSR_CSR=0Eh ;Read/write: 4 bits status on 6301 and LCD controller DEF OUT_BUFFER_6301=00000001b; 0=> 6301 has read PDIR DEF IN_BUFFER_6301 =00000010b; 1=> 6301 has written PDOR DEF COMMAND_FLAG1 =00000100b; 1=> command:0=> data from 6301 DEF COMMAND_FLAG2 =00001000b; 1=> command:0=> data from 6301 DEF PDOR_PDIR=0Fh;Read/write: 8 bits data and commands to 6301 DEF DRR_DWR =80h ;Read/write: 8 bits data from and to RAM disk DEF MSR_WCR =81h ;Read/write: command and handshake to RAM disk DEF DCR =84h ;Write: tone command to Modem DEF TONE_SELECTOR=00001111b DEF TONE_CONTROL =00010000b; 0=>off 1=>on DEF TONE_1=0 DEF TONE_2=1 DEF TONE_3=2 DEF TONE_4=4 DEF TONE_5=5 DEF TONE_6=6 DEF TONE_7=8 DEF TONE_8=9 DEF TONE_9=10 DEF TONE_*=12 DEF TONE_#=14 DEF TONE_A=3 DEF TONE_B=7 DEF TONE_C=11 DEF TONE_D=15 DEF OCR=85h ;Control lines for Modem DEF OHC=00000001b; 0=> on hook 1=> off DEF HSC=00000010b; 0=> handset off 1=> on DEF MON=00000100b; 0=> moniter off 1=> off DEF TXC=00001000b; 0=> send carrier off DEF ANS=00010000b; 0=> originate 1=> answer DEF TEST=00100000b; 0=> normal 1=> analog test DEF PWR=01000000b; 0=> power off DEF CCT=10000000b; 0=> signal not connected to line DEF MODEM_STR=86h ;Modem status DEF BELL_DETECT=00000001b; 0=>ringing 1=>normal DEF CARRIER_DETECT=00000100b;0=>Carrier 1=> not DEF MODEM_INSTALLED=10000000b;0=>Installed 1=>not DEF OMR =87h ;ouput 89h to make modem and 8251 compatible DEF MAR1=90h ;Address lines to Multi-unit DEF MAR2=91h DEF MAR3=92h DEF MAP =93h ;Read/Write 8 bit data for Multi-unit DEF MSR_MCR=94h ;Read/Write status and command to Multi-unit DEF RAM_PROTECT=00000001b ;0=> write enable 1=>protect DEF RAM_FILE= 00000010b ;0=> closed 1=> open DEF RAM_INSTALL=10000000b ;0=> installed 1=> not ble 1=>protect DEF