REM   port-register

'port
'config porta = input
'config portb = output
'config portc.1 = input
'config portc.3 = output
'config pind.1 = input


'32 register(8 bit) ****(R0-R31)   (R27-R26)---X **** (R29-R28)---Y  **** (R31-R30)---Z


'SET   **** SET bit/pin
'set portb.0

'RESET  **** RESET bit/pin
'reset portc.2

'TOGGLE  **** TOGGLE bit/pin
'toggle porta.7


'BITWAIT    **** BITWAIT B,SET/RESET
'dim b as bit
'dim a as integer
'bitwait b,set
'a=2*2
'end

'CPEEK    **** a=CPEEK(address)

'$asm
'LOADADR   **** LOADADR a,reg
'$end asm


'PEEK   **** a=PEEK(registers)
'dim a as Byte
'a=PEEK(29)
'print a
'end

'INP   **** a = INP(adr)

'OUT   **** OUT address,b

'POKE   **** POKE reg,b
'poke 22,8

'VARPTR    **** a=VARPTR(b)



















