	list      p=18F4620      		; list directive to define processor
	#include <config.inc>
	#include <P18F4620.INC>			; processor specific variable definitions
	;errorlevel  -302               ; suppress message 302 from list file

;****************************************************************************
;Reset Vector
;****************************************************************************
	ORG		0x0000			; processor reset vector
	clrf	BSR				; ensure we are at BANK0	
	clrf    PCLATH      		
	goto	Init			; go to beginning of program
	ORG		0x0008			; inturrupt vector

;****************************************************************************
;Basic Device Initialisation
;****************************************************************************
;{
Init:
	movlw	0x70				
	movwf	OSCCON			;set internal oscillator to 8MHz
Init_2:
	btfss	OSCCON,OSTS		;wait until oscillator is stable 
	goto	Init_2	
	clrf	INTCON			;turn off all interrupts
	clrf	PIE1			;disable peripheral interrupts
	clrf	PIE2			;disable other peripheral interrupts

	movlw	b'00000000'
	movwf	ADCON0			;A/D off
	movlw	b'00001111'		
	movwf	ADCON1			;set AN0 and AN1 to analogue, all others to digital
	movlw	b'00101100'		;left justified, TAD = 12, Fosc/4
	movwf	ADCON2			;set justification and sample times
	movlw	0x07
	movwf	CMCON			;comparator off
	movlw	0x00
	movwf	CVRCON			;reference voltage off

	clrf	LATA			;clear all ports
	clrf	LATB
	clrf	LATC
	clrf	LATD
	clrf	LATE

;			b'76543210'
	movlw	b'00000000'		;7:-, 6:-, 5:?, 4:?, 3:?, 2:?, 1:?, 0:?
	movwf	TRISA			;

	movlw	b'00000001'		;7:-, 6:-, 5:O-DACRST, 4:O-DACLAT, 3:O-DAC, 2:O-DAC, 1:O-CTS, 0:I-RTS
	movwf	TRISB			;
	clrf	PORTB
	bsf		PORTB,CTS		;set the clear to send (to dissable terminal transmit)
	bsf		PORTB,DACLAT

	movlw	b'11000000'		;7:I-TX, 6:I-RX, 5:O-NCHG, 4:O-CH, 3:O-LAT, 2:O-CLK, 1:O-SI1(balck), 0:OSI2(colour)
	movwf	TRISC			;do not change first two bits else RS232 won't work!! b'11xxxxxx'
	clrf	PORTC
	bsf		PORTC,NCHG

	movlw	b'00000000'		;7:O-DAC9, 6:O-DAC8, 5:O-DAC7, 4:O-DAC6, 3:O-DAC5, 2:O-DAC4, 1:O-DAC3, 0:O-DAC2
	movwf	TRISD			;
	clrf	PORTD

	movlw	b'00000000'		;7:-, 6:-, 5:-, 4:-, 3:-, 2:?, 1:?, 0:?
	movwf	TRISE			;

	call	InitRS232		;sets up the RS232 port
	call	Main			;main program is called here, hopefully we should never return to here, if we have then there was an error
Finish:
	goto	Finish
;}
;****************************************************************************
;Main
;****************************************************************************
;{
Main:
	banksel BANK0
	;goto	Main_2a	;debug (removes the need for the 5 null characters to be sent by terminal to initialise comms)

	movlw	d'5'			;to start communications we're wanting to receive 5 null bytes from the terminal
	movwf	LOOP			;so setup a loop counter to make sure we get them
Main_2:
	call	RS232Rx			;go get a byte from the terminal
	movlw	0x00			;load W with the null byte
	iorwf	RCBUFF,W		;inclusive OR the received byte with the null byte
	btfss	STATUS,Z		;is the result zero (it should be)
	goto	Main			;no, we didnt get a null byte, start again
	decfsz	LOOP			;yes, we got a null byte so decrement the loop, if its zero then continue,
	goto	Main_2			;if it's not zero then get the next byte
	
	movlw	0x01			;
	call	RS232Tx			;

Main_2a:
	nop						;DEBUG nop

	call	Prompt			;start a new line and put a prompt
	Send_String version		;show the user what version of the software we're using
;	call	EOF

	call	Prompt			;start a new line and put a prompt
	Send_String ready		;let the user know we're ready (this should also put a prompt)
;	call	EOF

	goto	Main_3			;not necessarily needed, but at least we know where we're going

Main_3:
	nop						;DEBUG nop	

;	movlw	d'1'			;DEBUG
;	call	delay10ms		;DEBUG

	call	Prompt
	call	GetCommand
	call	InterpretCommand

;	call	RS232Rx			;obsolete charcater echo test
;	movf	RCBUFF,W		;
;	nop						;DEBUG nop
;	call	RS232Tx			;

	goto	Main_3
;}
;****************************************************************************
;GetCommand: Reads a command ( up to 31 characters long ) from the serial port. Terminated by a CR or LF character
;****************************************************************************
;{
GetCommand:
	lfsr	FSR0,COMMAND	;set the pointer to cmdLine
	clrf	LOOP			;clear the counter
	clrf	INDF0			;clear the destination register

GetCommand_2:				;read characters, copy to string until CR, LF or length = 31
	call	RS232Rx		 	;get a byte from the serial port
	movf	RCBUFF,W		;check for a line feed
	sublw	0x0A
	btfsc	STATUS,Z
	return					;got a line feed so rached end of command

	movf	RCBUFF,W		;check for a carriage return
	sublw	0x0D
	btfsc	STATUS,Z
	return					;got a carriage return so rached end of command

	movf	RCBUFF,W		;save character, and add zero terminator
	movwf	POSTINC0		;move the character into the register where the file pointer is pointing to, then increment the pointer
	clrf	INDF0			;pointer has just been incremented, clear the new register
	incf	LOOP,F			;increment the index
    
	movlw	d'31'			;check to see if the counter has reached 31, ie. character received
	subwf	LOOP,W
	btfsc	STATUS,Z
	return					;we've reached the maximum so return
	movf	RCBUFF,W	;debug
  	call	RS232Tx		;debug, perhpaps keep?
	goto	GetCommand_2	;we haven't reached the maximum amount of characters yet so test for the next one
;}
;****************************************************************************
;Command Interpreter
;****************************************************************************
;{
InterpretCommand:
	movlw	HIGH command_table		;get the high byte of the address for the command table
	movwf	CMDPH					
	movlw	LOW command_table		;get the low byte of the address for the command table
	movwf	CMDPL

InterpretCommand_2:
	clrf	TBLPTRU					;clear the upper table pointer
	movf	CMDPH,W
	movwf	TBLPTRH					;set the high byte of the table pointer
	movf	CMDPL,W
	movwf	TBLPTRL					;set the low byte of the table pointer

	tblrd*+							;read the value from the table (data is put in TABLAT) then increment the pointer
	movf	TABLAT,W				;put the data in W
	movwf	CODEPL					;
	tblrd*+							;read the value from the table (data is put in TABLAT) then increment the pointer
	movf	TABLAT,W				;put the data in W
	movwf	CODEPH					;

	iorwf	CODEPL,W				;if this pointer is to null, then exit
	btfsc	STATUS,Z
	return

; codePtr points to a command string. Is it the same as ours?
; FSR0 points to the cmd string entered by user,
; tblrd set to point to the beginning of the rom string
	lfsr	FSR0,COMMAND

	movf	CODEPH,W
	movwf	TBLPTRH
	movf	CODEPL,W
	movwf	TBLPTRL

acNextChar
	tblrd*+
	movf	TABLAT,W
; If it is null, we have reached the end of the rom string without any
; error, so execute the command.
	btfsc	STATUS,Z
	goto	acDoAction
; Ignore the bit that switches between upper and lower case
	xorwf	POSTINC0,W
	andlw	0xDF
	btfss	STATUS,Z
	goto	acNextCmd               ; Command chars differs - try next command
	goto	acNextChar
acNextCmd
; move to next string pointer
;	movlw	0x06
	movlw	0x04
	addwf	CMDPL,F
	movlw	0x00
	addwfc  CMDPH,F
	goto	InterpretCommand_2
acDoAction
; Jump to the function
;	movlw	0x04
	movlw	0x02
	addwf	CMDPL,F
	movlw	0x00
	addwfc	CMDPH,W
	movwf	TBLPTRH
	movf	CMDPL,W
	movwf	TBLPTRL

	tblrd*+
	movf	TABLAT,W
	movwf	CODEPL

	tblrd*+
	movf	TABLAT,W
	movwf	PCLATH

	clrf	PCLATU
	movf	CODEPL,W
	movwf	PCL
; No more code - the last instruction magically jumps away
; to the select routine. When that returns, returns to the routine
; which called this one.
;}
;****************************************************************************
;Ink Sptit Routine
;****************************************************************************

;need moving somewhere else
	bcf		PORTC,SI2
	bcf		PORTC,SI1
	bcf		PORTC,CLK
	bcf		PORTC,LAT
	bcf		PORTC,CH
	bsf		PORTC,NCHG
	bsf		PORTB,DACRST
	movlw	0x5c
	movwf	PORTD
	bsf		PORTB,DACLAT
	nop
	bcf		PORTB,DACLAT
	







InkSpit:
;	bsf		PORTC,NCHG	;NCHG should be high already, but just to make sure
;	movlw	d'10'
;	call	waitus

	bcf		PORTC,NCHG	
	nop					;cant accieve 35ns wait as minimum cycle is 100ns

	bsf		PORTC,LAT
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT

	bcf		PORTC,LAT
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT

	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bsf		PORTC,NCHG
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT

	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT

	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT

	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT

	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT

	;first line
	nop
	nop
	nop
	movlw	0x5b
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x59
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x58
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x57
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x56
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x55
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x54
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x53
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x52
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x51
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x50
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x4F
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x4E
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x4C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x4B
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x4A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x49
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x48
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x48
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x48
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x48
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x48
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x48
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x48
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x48
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x48
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x48
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x48
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x49
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x4A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x4C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x4D
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x4E
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x4F
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x50
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x51
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x52
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x54
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x55
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x56
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	;second line
	
	nop
	nop
	nop
	movlw	0x57
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x58
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x59
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x5A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	;;;;;;;;;;;;;;
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bsf		PORTC,CH
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,CH
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	;;;;;;;;;;;;
	
	;third line
	
	bcf		PORTC,SI1	;data set 1, 1
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x55
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	
	bcf		PORTC,SI1	;data set 1, 2
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x4E
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 3
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x47
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 4
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x40
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 5
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x39
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 6
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x32
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 7
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x2B
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 8
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x24
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 9
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x1D
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 10
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x16
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 11
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x0F
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 12
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x08
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 13
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 14
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 15
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 16
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 17
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 18
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 19
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 20
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 21
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 22
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x17
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 23
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x2E
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 24
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x45
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 25
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 26
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x73
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 27
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 28
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 29
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 30
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 31
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 32
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 33
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 34
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 35
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 36
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 37
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 38
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x86
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 39
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x82
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 40
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x7E
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	;fourth line
	
	bcf		PORTC,SI1	;data set 1, 41
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x79
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 42
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x75
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 43
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x71
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 44
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x6D
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 1, 45
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x68
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x64
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x60
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	;need some wait here
	bcf		PORTC,NCHG
;3 blocks	
	bsf		PORTC,LAT
;1 block
	bsf		PORTC,NCHG
;2 blocks
	bcf		PORTC,LAT

;6 blocks	

	bcf		PORTC,SI1	;data set 2, 1
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 2
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 3
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 4
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 5
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 6
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 7
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 8
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 9
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 10
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 11
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 12
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 13
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	;should be some fucking code here?!?!?!?!
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	
	;fifth line
	
	bcf		PORTC,SI1	;data set 2, 14
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x55
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 15
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x4F
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 16
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x48
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 17
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x42
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 18
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x3B
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 19
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x35
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 20
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x2E
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 21
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x28
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 22
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x21
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 23
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x1B
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 24
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x14
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 25
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x0E
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 26
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x07
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 27
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 28
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 29
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 30
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 31
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 32
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 33
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x12
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2,34 
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x24
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 35
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x36
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 36
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x49
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 37
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 38
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 39
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 40
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 41
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 42
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 43
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x67
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 44
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x73
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 45
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x7E
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 46
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 47
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 48
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 49
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;ddata set 2, 50
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 51
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 52
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 53
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	;sixth line
	
	bcf		PORTC,SI1	;data set 2, 54
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 55
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 56
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 57
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 58
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 59
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 60
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 61
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x88
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 62?
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x86
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 63?
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x83
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 64?
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x81
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 65?
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x7F
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 66?
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x7C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 67?
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x7A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 68?
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x78
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 69?
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x75
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 70?
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x73
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	
	bcf		PORTC,SI1	;data set 2, 71?
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x71
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	bcf		PORTC,SI1	;data set 2, 72?
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x6E
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 73?
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x6C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bcf		PORTC,SI1	;data set 2, 74?
	bsf		PORTC,CLK
	bcf		PORTC,CLK
	movlw	0x6A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	nop
	nop
	nop
	movlw	0x67
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x65
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x63
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x60
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5E
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	
	bcf		PORTC,NCHG
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	
	bsf		PORTC,CH
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	;seventh line
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	bcf		PORTC,NCHG
	
	
	bcf		PORTC,CH
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT

	bsf		PORTC,NCHG				;wtf??????
		
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT

	bcf		PORTC,NCHG				;is this correct?

	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf	PORTB,DACLAT
	bcf	PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	bsf		PORTC,NCHG				;is this right?

	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x55
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x4F
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x48
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT

	bsf		PORTC,NCHG				;wtf?
	
	nop
	nop
	movlw	0x42
	movwf	PORTD
	bcf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x3B
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x35
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x2E
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x28
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x21
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x1B
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x14
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x0E
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	;eigth line
	
	nop
	nop
	nop
	movlw	0x07
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x01
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	
	nop
	nop
	nop
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	
	nop
	nop
	nop
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x00
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x17
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	
	nop
	nop
	nop
	movlw	0x2E
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x45
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x73
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x8A
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x86
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x82
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x7E
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x79
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x75
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x71
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x6D
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x68
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x64
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x60
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT
	
	
	nop
	nop
	nop
	movlw	0x5C
	movwf	PORTD
	bsf		PORTB,DACLAT
	bcf		PORTB,DACLAT

	return

;****************************************************************************
;RS232 Transmit/Receive Routines
;****************************************************************************
;{
RS232Tx:
;	bcf		PORTB,CTS	;debug
	movwf	TXREG				;put data in TX register, initiates TX routine too
	bcf		PIR1,TXIF
	nop
RS232Tx2:
	btfss	PIR1,TXIF			;test TX interrupt flag to see if TX is complete
	goto	RS232Tx2			;if not then try again
;	bsf		PORTB,CTS	;debug
	return

RS232Rx:
	clrf	RCBUFF				;make sure the receive buffer is empty
	movlw	d'255'
	movwf	RCWait				;reset the wait counter (used to test for timeouts)
	bcf		PIR1,RCIF			;clear interrupt to prevent errors
RS232Rx_2:
	btfsc	PORTB,RTS			;check to see if terminal wants to send data
	goto	RS232Rx_2			;not yet,check again
	bcf		PORTB,CTS			;yes, terminal has data to send, enable CTS
RS232Rx_3:
	btfsc	PIR1,RCIF			;is receive buffer full?
	goto	RS232Rx_4			;yes, continue
	decfsz	RCWait,F			;no, then decrement the wait counter, is it zero?
	goto	RS232Rx_3			;no, so go and check the buffer again
	bsf		PORTB,CTS			;wait counter has reached zero, disable CTS
	goto	RS232Rx				;start the routine again (may need to be changed to go somewhere more sensible)
RS232Rx_4:
	movf	RCREG,W				;buffer was filled, put the data into W
	movwf	RCBUFF				;then put the data in RCBUFF for storage
	bsf		PORTB,CTS			;disable CTS
	return

Table_To_RS232:
	tblrd*+
	movf	TABLAT,W
	btfsc	STATUS,Z
	return
	call	RS232Tx
	goto	Table_To_RS232
;}
;****************************************************************************
;Prompt Display
;does a carriage return then shows "=> "
;****************************************************************************
;{
Prompt:
	call	NewLine
	movlw	0x3D		;=
	call	RS232Tx
	movlw	0x3E		;>
	call	RS232Tx
	return
NewLine:
;	movlw	0x0A		;line feed
;	call	RS232Tx
	movlw	0x0D		;carriage return
	call	RS232Tx
	return	

EOF:
	movlw	0x1A
	call	RS232Tx
	return
;}
;****************************************************************************
;USART Initialisation - 19200 baud
;****************************************************************************
;{
InitRS232:
	movlw	0x08					;set baud rate generator
	movwf	SPBRG
	movlw	0x02					;set baud rate generator high byte
	movwf	SPBRGH
	movlw	0x20
	movwf	TXSTA
	bsf		TXSTA,BRGH				;set high baud rate bit for error correction
	bsf		BAUDCON,BRG16
	movlw	0x90
	movwf	RCSTA
	return
;}
;****************************************************************************
;Delay Routines
;****************************************************************************
;{
waitus:
	return

delay50us:
	movwf	delay_2
delay50us_2:
	movlw	Dealy_50us_Constant
	movwf	delay_1
delay50us_3:
	decfsz	delay_1,F
	bra		delay50us_3
	decfsz	delay_2,F
	bra		delay50us_2
	return

delay10ms:
	movwf	delay_3
delay10ms_2:
	movlw	d'201'
	call	delay50us
	decfsz	delay_3,F
	bra		delay10ms_2
	return
;}
;****************************************************************************        
;The first word points to the string that is the command the user typed
;The second is a pointer to the actual command executed when that command is typed by the user.
;****************************************************************************        
;{
;command lookup table
command_table:	dw	CMD_ONE,	CmdOne
				dw	CMD_TWO,	CmdTwo
				dw  CMD_THREE,	CmdThree
				dw	CMD_SPIT,	CmdSpit
				dw	CMD_RESET,	CmdReset
				dw	0x0000,		0x0000,		0x0000				;end of commands marker

;user typed strings
CMD_ONE			da  "ONE",		0x00
CMD_TWO			da  "TWO",		0x00
CMD_THREE		da  "THREE",	0x00
CMD_SPIT		da  "SPIT",		0x00
CMD_RESET		da	"RESET",	0x00

;called functions
CmdOne:
	call	NewLine
	Send_String one
;	call	EOF
	return
CmdTwo:
	call	NewLine
	Send_String two
;	call	EOF
	return
CmdThree:
	call	NewLine
	Send_String three
;	call	EOF
	return
CmdSpit:
	call	NewLine
	Send_String spit
	return
CmdReset:
	reset
	return
;}
;****************************************************************************
;Tables
;****************************************************************************
	ORG		0x03000
;{
one:			da	"This is one: 1", 0x00
two:			da	"This is two: 2", 0x00
three:			da	"This is three: 3", 0x00
spit:			da	"We're gonna spit some ink, dude!!", 0x00

ready:			da	"Ready", 0x00
version:		da	"Software Version: v0.10", 0x00
;}
	end
