;40:49	byte	Current video mode
;40:4A	word	Number of screen columns
;40:4C	word	Size of current video regen buffer in bytes
;40:4E	word	Offset of current video page in video regen buffer
;40:50  8 words	Cursor position of pages 1-8, high order byte=row
;				low order byte=column; changing this data isn't
; 				reflected immediately on the display
;40:62	byte	Active display page number
;40:63	word	Base port address for active 6845 CRT controller
;				3B4h = mono, 3D4h = color
;40:65	byte	6845 CRT mode control register value (port 3x8h)
;				EGA/VGA values emulate those of the MDA/CGA
;40:66	byte	CGA current color palette mask setting (port 3d9h)
;				EGA and VGA values emulate the CGA
INT10:  ;Video
	CMP AH, 0X00		;SET VIDEO MODE		
	JZ INT10_AH_00	
	CMP AH, 0X02 		;SET CURSOR POSITION
	JZ INT10_AH_02	
	CMP AH, 0X05 		;SELECT ACTIVE DISPLAY PAGE  
	JZ INT10_AH_05	
	CMP AH, 0X09 		;WRITE CHARACTER AND ATTRIBUTE AT CURSOR POSITION
	JZ INT10_AH_09	
	CMP AH, 0X0B 		;SET PALETTE CGA
	JZ INT10_AH_0B		;
	CMP AH, 0x0E        ;TELETYPE
	JZ .TELETYPE       
	CMP AH, 0X0F 		;GET CURRENT VIDEO MODE
	JZ INT10_AH_0F		;	

	IRET			;END
	;DEBUGING	
	PUSH AX
	MOV AH, 0X0E	;SET AH 0X0E FOR TELOTYPE
	MOV AL, 0X0D	;SET AL TO CHAR	
	INT 0X10		;CALL INTERRUPT 0X10
	MOV AL, 0X0A	;SET AL TO CHAR	
	INT 0X10		;CALL INTERRUPT 0X10
	MOV AL, 'I'		;SET AL TO CHAR	
	INT 0X10		;CALL INTERRUPT 0X10
	MOV AL, '1'		;SET AL TO CHAR	
	INT 0X10		;CALL INTERRUPT 0X10
	MOV AL, '0'		;SET AL TO CHAR
	INT 0X10		;CALL INTERRUPT 0X10
	MOV AL, ' '		;SET AL TO CHAR
	INT 0X10		;CALL INTERRUPT 0X10
	POP AX
	CALL DUMP_REGISTERS	
	;HLT
	IRET			;END
	
		
   .TELETYPE: 	;0X0450
 	PUSH AX
	PUSH BX
	PUSH CX
	PUSH DX
	PUSH DI
	PUSH SI
	PUSH DS
	PUSH ES
	PUSH AX
	MOV AX, 0X0040
	MOV DS, AX					;Set data segment
	MOV AH, 0X00				;ah=0
	MOV AL, BYTE [0X51]			;Current Row
	MOV CX, WORD [0x04A] 		;number of cols per row
	ADD CX, CX					;Double col for hidden char data
	MUL CL						;mul Current row * cols
	MOV BH, 0X00				;BH=0
	MOV BL, BYTE [0X50]			;Set current col
	ADD BX, BX					;Double col for hidden char data
	ADD BX, AX					;Add in row
	MOV AX, 0XB800				;
	MOV DS, AX					;Set video segment
	POP AX						;restore char	
	CMP AL, 0X0D				;Check for enter
	JZ .ENTER					;return carrage
	CMP AL, 0X0A				;Check for line feed
	JZ .LINE_FEED				;line feed
	CMP AL, 0X08				;check for back space
	JZ .BACKSPACE
	MOV [BX], AL				;Char out
	JMP .MOVE_CURSOR_FORWARD

 .MOVE_CURSOR_FORWARD:
	MOV AX, 0X0040				;Check col
	MOV DS, AX					;Set data segment	
	MOV BX, 0X0050				;Col
	MOV AH, 0X00				;AH=0
	MOV AL, BYTE [BX]			;get current col
	INC AL						;inc col
	CMP AX, WORD [0x04A] 		;number of cols per row
	JB .NOT_END_OF_COL
  .END_OF_COL:	
  	MOV AX, 0X0040				;Check col
	MOV DS, AX					;Set data segment	
  	MOV BX, 0X0050				;
	MOV AL, 0X00				;
	MOV BYTE [BX], AL			;Set col to 0
	MOV BX, 0X0051				;Row
	MOV AH, 0X00				;AH=0
	MOV AL, BYTE [BX]			;get current ROW
	INC AL						;inc row
	CMP AX, 0X19				;cmp to 25
	JB .NOT_END_OF_ROWS
  .SCROLL_UP:	
	CLD							;SCROLL UP	
	MOV AX, 0X0040
	MOV DS, AX
	CMP BYTE [0X49], 0X00		;IF MODE 0
	JZ .SCROLL_40
	CMP BYTE [0X49], 0X01		;IF MODE 1
	JZ .SCROLL_40				
.SCROLL_80:						;MODE 2 AND 3			
	MOV AX, 0XB800
	MOV ES, AX
	MOV DI, 0X0000
	MOV AX, 0XB800
	MOV DS, AX
	MOV SI, 0X00A0			;NEXT LINE
	MOV CX, 4000			;TIMES
	REP MOVSB
	JMP .END_INT10
.SCROLL_40:					;MODE 0 AND 1
	MOV AX, 0XB800
	MOV ES, AX
	MOV DI, 0X0000
	MOV AX, 0XB800
	MOV DS, AX
	MOV SI, 0X0050			;NEXT LINE
	MOV CX, 2000			;TIMES
	REP MOVSB	
	JMP .END_INT10
	
 .NOT_END_OF_ROWS:
	MOV BX, 0X0051				;ROW
	MOV BYTE [BX], AL			;STORE AL=ROW
	JMP .END_INT10				;END

.NOT_END_OF_COL:
	MOV BX, 0X0050				;Col
	MOV BYTE [BX], AL			;STORE AL=COL
	JMP .END_INT10				;END	

  .ENTER:
  	MOV AX, 0X0040				;Check col
	MOV DS, AX					;Set data segment	
  	MOV BX, 0X0050				;
	MOV AL, 0X00				;
	MOV BYTE [BX], AL			;Set col to 0
	JMP .END_INT10	
	
  .LINE_FEED:
  	MOV AX, 0X0040				;Check col
	MOV DS, AX					;Set data segment	
	MOV BX, 0X0051				;Row
	MOV AH, 0X00				;AH=0
	MOV AL, BYTE [BX]			;get current ROW
	INC AL						;inc row
	CMP AX, 0X19				;cmp to 25
	JB .NOT_END_OF_ROWS			;STORE AL IN ROW AND END
	JMP .SCROLL_UP				;SCROLL UP
	
  .BACKSPACE:	
    SUB BX, 0X0002				;GO BACK A SPACE IN RAM
    MOV BYTE [BX], 0X00			;Clear char
 	MOV AX, 0X0040				;Check col
	MOV DS, AX					;Set data segment	
	MOV BX, 0X0050				;Col
	MOV AH, 0X00				;AH=0
	MOV AL, BYTE [BX]			;get current col
	DEC AL						;
	CMP AX, WORD [0x04A] 		;number of cols per row
	JB .NOT_BEGIN_OF_COL
  .BEGIN_OF_COL:	
  	MOV AX, 0X0040				;Check col
	MOV DS, AX					;Set data segment	
  	MOV BX, 0X0050				;
	MOV AL, 0X4F				;
	MOV BYTE [BX], AL			;Set col to 49
	MOV BX, 0X0051				;Row
	MOV AH, 0X00				;AH=0
	MOV AL, BYTE [BX]			;get current ROW
	DEC AL						;dec row
	CMP AX, 0X19				;cmp to 25
	JB .NOT_END_OF_ROWS
  .BEGIN_OF_ROW:	
  	MOV BX, 0X0050				;col
	MOV BYTE [BX], 0X00
	MOV BX, 0X0051				;ROW
	MOV BYTE [BX], 0X00
	JMP .END_INT10
	
 .NOT_BEGIN_OF_ROW:
	MOV BX, 0X0051				;ROW
	MOV BYTE [BX], AL
	JMP .END_INT10

.NOT_BEGIN_OF_COL:
	MOV BX, 0X0050				;Col
	MOV BYTE [BX], AL
	JMP .END_INT10 
  
   .END_INT10:
    POP ES
	POP DS
	POP SI
	POP DI
	POP DX
	POP CX
	POP BX
	POP AX
	;STI
	IRET
	
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;	
;SET VIDEO MODE
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
INT10_AH_00:				
	PUSH DS					;STORE DS
	PUSH BX					;STORE BX
	PUSH CX					;STORE CX
	PUSH AX					;STORE AX
	PUSH AX					;STORE AX
	
	MOV AX, 0x0040			;BIOS DATA AREA 0X400
	MOV DS, AX				;SET DS TO BIOS DATA AREA
	POP AX					;RESTORE AX
	;;;;;;;;;;;;;;;;;;;;;;;;;;;
	AND AL, 0X07			;JUST FOR NOW LIMITED MODES AVAILABLE 
	;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
	MOV [0X49], AL			;40:49 SET VIDEO MODE
	CMP AL, 0X00			;IF MODE 0
	JZ .CLEAR_SCREEN_MODE0	;CLEARS SCREEN
	CMP AL, 0X01			;IF MODE 1
	JZ .CLEAR_SCREEN_MODE0	;CLEARS SCREEN
	CMP AL, 0X02			;IF MODE 2
	JZ .SET_MODE2

	CMP AL, 0X03			;IF MODE 3
	JZ .CLEAR_SCREEN_MODE2	;CLEARS SCREEN
	CMP AL, 0X04			;IF MODE 4
	JZ .SET_MODE4

	
 .CLEAR_SCREEN_MODE0:	
	MOV WORD [0X004A], 0X0028	;SET COL COUNT 40
	JMP .CLEAR_SCREEN_TEXT_MODE
 .CLEAR_SCREEN_MODE2:
	MOV WORD [0X004A], 0X0050	;SET COL COUNT 80
	JMP .CLEAR_SCREEN_TEXT_MODE
	
 .SET_MODE2:
	MOV WORD [0X004A], 0X0050	;SET COL COUNT 80
	
	MOV AX, CS
	MOV DS, AX

	MOV AH, 0X00
	MOV CX, 0X0010
	MOV BX, .CGA_TEXT_80X25

	MOV AL, 0X00
	MOV DX, 0X03D8
	OUT DX, AL

  .CRT_LOOP_MODE2:
	MOV AL, [BX]
	CALL .WRITE_CGA_REG
	INC AH
	INC BX
	LOOP .CRT_LOOP_MODE2

	MOV AL, 0X2D
	MOV DX, 0X03D8			;MODE CONTROL REG
	OUT DX, AL
	
	MOV AL, 0X30
	MOV DX, 0X03D9			;COLOR SELECT REG
	OUT DX, AL	
	
	JMP .CLEAR_SCREEN_TEXT_MODE

 .CLEAR_SCREEN_TEXT_MODE:
	MOV AX, 0XB800				;VIDEO MEM
	MOV DS, AX					;SET DS
	MOV BX, 0X0000				;BX = 0
	MOV CX, 2080 				;TIMES TO LOOP, YES NOT HEX
	MOV AX, 0X0700				;0 B/W
  .LOOP_CLS_MODE0:				;LOOP TO CLEAR SCREEN
	MOV WORD [BX], AX			;WORD [BX] = AX
	ADD BX, 0X0002				;INC BX X2
	LOOP .LOOP_CLS_MODE0		;LOOP TIL DONE	
	JMP .END					;END

.SET_MODE4:
	MOV WORD [0X004A], 0X0028	;SET COL COUNT 40
	
	MOV AX, CS
	MOV DS, AX

	MOV AH, 0X00
	MOV CX, 0X0010
	MOV BX, .CGA_GRAPHICS

	MOV AL, 0X00
	MOV DX, 0X03D8
	OUT DX, AL

  .CRT_LOOP_MODE4:
	MOV AL, [BX]
	CALL .WRITE_CGA_REG
	INC AH
	INC BX
	LOOP .CRT_LOOP_MODE4

	MOV AL, 0X2E
	MOV DX, 0X03D8
	OUT DX, AL
	
	MOV AL, 0X30
	MOV DX, 0X03D9			;COLOR SELECT REG
	OUT DX, AL	
	
	
	JMP .CLEAR_SCREEN_MODE4
	
  .CLEAR_SCREEN_MODE4:
	MOV AX, 0XB800				;VIDEO MEM
	MOV DS, AX					;SET DS
	MOV BX, 0X0000				;BX = 0
	MOV CX, 0X2000				;TIMES TO LOOP
	MOV AX, 0X0000				;CLEAR SCREEN TO NOTHING 
  .LOOP_CLS_MODE4:				;LOOP TO CLEAR SCREEN
	MOV WORD [BX], AX			;WORD [BX] = AX
	ADD BX, 0X0002				;INC BX X2
	LOOP .LOOP_CLS_MODE4		;LOOP TIL DONE	
	JMP .END					;END

  .END:
 	POP AX			;RESTORE AX
 	POP CX			;RESTORE CX
	POP BX			;RESTORE BX
	POP DS			;RESTORE DS
	IRET


; CGA TEXT 40x25 MODE
DB 0X38, 0X28, 0X2D, 0X0A, 0X1F, 0X06, 0X19, 0X1C
DB 0X02, 0X07, 0X06, 0X07, 0X00, 0X00, 0X00, 0X00

; CGA TEXT 80x25 MODE
.CGA_TEXT_80X25:
DB 0X71, 0X50, 0X5A, 0X0A, 0X1F, 0X06, 0X19, 0X1C
DB 0X02, 0X07, 0X06, 0X07, 0X00, 0X00, 0X00, 0X00

; CGA GRAPHICS MODE
.CGA_GRAPHICS:
DB 0X38, 0X28, 0X2D, 0X0A, 0X7F, 0X06, 0X64, 0X70
DB 0X02, 0X01, 0X06, 0X07, 0X00, 0X00, 0X00, 0X00

; MDA TEXT 80x25 MODE
DB 0X61, 0X50, 0X52, 0X0F, 0X19, 0X06, 0X19, 0X19
DB 0X02, 0X0D, 0X0B, 0X0C, 0X00, 0X00, 0X00, 0X00



.WRITE_CGA_REG:
	PUSH DX	
	MOV DX, 0X03D4	; DX = CRTC INDEX PORT
	PUSH AX
	MOV AL, AH 		; AH = BYTE, AL = REGISTER NUMBER
	OUT DX, AL		; write register number
	INC DX			; DX = CRTC data port
	POP AX
	OUT DX, AL		; WRITE BYTE
	POP DX
	RET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;	
;SET CURSOR POSITION
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
INT10_AH_02:
	PUSH DS			;STORE DS
	PUSH BX			;STORE BX
	PUSH AX			;STORE AX
	
	MOV AX, 0X0045	;BIOS DATA 0X450 CURSOR POSITION BASE PAGE 0
	MOV DS, AX		;SET DS TO 0X450
	MOV AX, 0X02	;TIMES (BH * 2) TO GET THE PAGE OFFSET FROM 0X450
	MUL BH			;AL = PAGE OFFSET
	MOV BX, AX		;BX = AX
	MOV [BX], DL	;STORE COLUMN
	INC BX			;INC BX
	MOV [BX], DH	;STORE ROW	

	POP AX			;RESTORE AX
	POP BX			;RESTORE BX
	POP DS			;RESTORE DS
	IRET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;	
;SELECT ACTIVE DISPLAY PAGE      
;"MAYBE WORKS" DONT KNOW IF IT WANTS A NUMBER 0-7 OR MEM ADDRESS OFFSET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
INT10_AH_05:
	PUSH DS			;STORE DS
	PUSH AX			;STORE AX
	MOV AX, 0X0040	;BIOS DATA 0X44E ACTIVE DISPLAY PAGE 
	MOV DS, AX		;SET DS
	POP AX			;RESTORE AX
	MOV [0X4E], AL	;SET PAGE NUMBER [0X0040:0X004E] = AL
	POP DS			;RESTORE DS
	IRET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;	
;WRITE CHARACTER AND ATTRIBUTE AT CURSOR POSITION
;AL = ASCII character to write
;BH = display page  (or mode 13h, background pixel value)		IGNORED
;BL = character attribute (text) foreground color (graphics) 
;CX = count of characters to write (CX >= 1)					IGNORED
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
INT10_AH_09:	
	PUSH DS			;STORE DS
	PUSH DX			;STORE DX
	PUSH CX			;STORE CX
	PUSH BX			;STORE BX
	PUSH AX			;STORE AX
	PUSH BX			;STORE BX
	PUSH AX			;STORE AX
		
	MOV AX, 0X0040
	MOV DS, AX					;Set data segment
	MOV AH, 0X00				;ah=0
	MOV AL, BYTE [0X51]			;Current Row
	MOV CX, WORD [0x04A] 		;number of cols per row
	ADD CX, CX					;Double col for hidden char data
	MUL CL						;mul Current row * cols
	MOV BH, 0X00				;BH=0
	MOV BL, BYTE [0X50]			;Set current col
	ADD BX, BX					;Double col for hidden char data
	ADD BX, AX					;Add in row
	MOV AX, 0XB800				;
	MOV DS, AX					;Set video segment
	POP AX						;RESTORE AX
	POP DX						;RESTORE BX
	MOV AH, DL					;GET ATTRIBUTES	
	MOV [BX], AX				
	
	POP AX			;RESTORE AX
	POP BX			;RESTORE BX
	POP CX			;RESTORE CX
	POP DX			;RESTORE DX
	POP DS			;RESTORE DS
	IRET
	
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;	
;WRITE CHARACTER AT CURSOR POSITION 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
INT10_AH_0A:
	IRET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;	
;SET PALETTE 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
INT10_AH_0B:		;
	PUSH DS			;STORE DS
	PUSH AX			;STORE AX
	CMP BH, 0X00 	;= 0	to set background and border color
					;= 1	to select 4 color palette
	JZ .END			;ONLY HANDLE BH = 1 FOR NOW
	MOV AX, 0x0040	;BIOS DATA AREA 0X400
	MOV DS, AX		;SET DS TO BIOS DATA AREA
	MOV [0X66], BL	;40:66 color palette
	
  .END:				;END OF INT10_AH_0B
	POP AX			;RESTORE AX
	POP DS			;RESTORE DS
	IRET
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;	
;GET VIDEO MODE
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
INT10_AH_0F:
	PUSH DS			;STORE DS
	MOV AX, 0x0040	;BIOS DATA AREA 0X400
	MOV DS, AX		;SET DS TO BIOS DATA AREA
	MOV AH, [0X4A]  ;NUMBER OF SCREEN COLUMNS
	MOV AL, [0X49]	;CURRENT MODE
	MOV BH, [0X4E]	;CURRENT PAGE
	POP DS			;RESTORE DS
	IRET

;----------------------------------------
; CHARACTER GENERATOR GRAPHICS FOR 320X200 AND 640X200 GRAPHICS
;----------------------------------------

	DB	000H,000H,000H,000H,000H,000H,000H,000H ; D_00
	DB	07EH,081H,0A5H,081H,0BDH,099H,081H,07EH ; D_01
	DB	07EH,0FFH,0DBH,0FFH,0C3H,0E7H,0FFH,07EH ; D_02
	DB	06CH,0FEH,0FEH,0FEH,07CH,038H,010H,000H ; D_03
	DB	010H,038H,07CH,0FEH,07CH,038H,010H,008H ; D_04
	DB	038H,07CH,038H,0FEH,0FEH,07CH,038H,07CH ; D_05
	DB	010H,010H,038H,07CH,0FEH,07CH,038H,07CH ; D_06
	DB	000H,000H,018H,03CH,03CH,018H,000H,000H ; D_07
	DB	0FFH,0FFH,0E7H,0C3H,0C3H,0E7H,0FFH,0FFH ; D_08
	DB	000H,03CH,066H,042H,042H,066H,03CH,000H ; D_09
	DB	0FFH,0C3H,099H,0BDH,0BDH,099H,0C3H,0FFH ; D_0A
	DB	00FH,007H,00FH,07DH,0CCH,0CCH,0CCH,078H ; D_08
	DB	03CH,066H,066H,066H,03CH,018H,07EH,018H ; D_0C
	DB	03FH,033H,03FH,030H,030H,070H,0F0H,0E0H ; D_0D
	DB	07FH,063H,07FH,063H,063H,067H,0E6H,0C0H ; D_0E
	DB	099H,05AH,03CH,0E7H,0E7H,03CH,05AH,099H ; D_0F

	DB	080H,0E0H,0F8H,0FEH,0F8H,0E0H,080H,000H ; D_10
	DB	002H,00EH,03EH,0FEH,03EH,00EH,002H,000H ; D_11
	DB	018H,03CH,07EH,018H,018H,07EH,03CH,018H ; D_12
	DB	066H,066H,066H,066H,066H,000H,066H,000H ; D_13
	DB	07FH,0DBH,0DBH,07BH,01BH,01BH,01BH,000H ; D_14
	DB	03EH,063H,038H,06CH,06CH,038H,0CCH,078H ; D_15
	DB	000H,000H,000H,000H,07EH,07EH,07EH,000H ; D_16
	DB	018H,03CH,07EH,018H,07EH,03CH,018H,0FFH ; D_17
	DB	018H,03CH,07EH,018H,018H,018H,018H,000H ; D_18
	DB	018H,018H,018H,018H,07EH,03CH,018H,000H ; D_19
	DB	000H,018H,00CH,0FEH,00CH,018H,000H,000H ; D_1A
	DB	000H,030H,060H,0FEH,060H,030H,000H,000H ; D_1B
	DB	000H,000H,0C0H,0C0H,0C0H,0FEH,000H,000H ; D_1C
	DB	000H,024H,066H,0FFH,066H,024H,000H,000H ; D_1D
	DB	000H,018H,03CH,07EH,0FFH,0FFH,000H,000H ; D_1E
	DB	000H,0FFH,0FFH,07EH,03CH,018H,000H,000H ; D_1F

	DB	000H,000H,000H,000H,000H,000H,000H,000H ; SP D_20
	DB	030H,078H,078H,030H,030H,000H,030H,000H ; ! D_21
	DB	06CH,06CH,06CH,000H,000H,000H,000H,000H ; " D_22
	DB	06CH,06CH,0FEH,06CH,0FEH,06CH,06CH,000H ; # D_23
	DB	030H,07CH,0C0H,078H,00CH,0F8H,030H,000H ; $ D_24
	DB	000H,0C6H,0CCH,018H,030H,066H,0C6H,000H ; PER CENT D_25
	DB	038H,06CH,038H,076H,0DCH,0CCH,076H,000H ; & D_26
	DB	060H,060H,0C0H,000H,000H,000H,000H,000H ; ' D_27
	DB	018H,030H,060H,060H,060H,030H,018H,000H ; ( D_28
	DB	060H,030H,018H,018H,018H,030H,060H,000H ; ) D_29
	DB	000H,066H,03CH,0FFH,03CH,066H,000H,000H ; * D_2A
	DB	000H,030H,030H,0FCH,030H,030H,000H,000H ; + D_2B
	DB	000H,000H,000H,000H,000H,030H,030H,060H ; , D_2C
	DB	000H,000H,000H,0FCH,000H,000H,000H,000H ; - D_2D
	DB	000H,000H,000H,000H,000H,030H,030H,000H ; . D_2E
	DB	006H,00CH,018H,030H,060H,0C0H,080H,000H ; / D_2F

	DB	07CH,0C6H,0CEH,0DEH,0F6H,0E6H,07CH,000H ; 0 D_30
	DB	030H,070H,030H,030H,030H,030H,0FCH,000H ; 1 D_31
	DB	078H,0CCH,00CH,038H,060H,0CCH,0FCH,000H ; 2 D_32
	DB	078H,0CCH,00CH,038H,00CH,0CCH,078H,000H ; 3 D_33
	DB	01CH,03CH,06CH,0CCH,0FEH,00CH,01EH,000H ; 4 D_34
	DB	0FCH,0C0H,0F8H,00CH,00CH,0CCH,078H,000H ; 5 D_35
	DB	038H,060H,0C0H,0F8H,0CCH,0CCH,078H,000H ; 6 D_36
	DB	0FCH,0CCH,00CH,018H,030H,030H,030H,000H ; 7 D_37
	DB	078H,0CCH,0CCH,078H,0CCH,0CCH,078H,000H ; 8 D_38
	DB	078H,0CCH,0CCH,07CH,00CH,018H,070H,000H ; 9 D_39
	DB	000H,030H,030H,000H,000H,030H,030H,000H ; : D_3A
	DB	000H,030H,030H,000H,000H,030H,030H,060H ; ; D_3B
	DB	018H,030H,060H,0C0H,060H,030H,018H,000H ; < D_3C
	DB	000H,000H,0FCH,000H,000H,0FCH,000H,000H ; = D_3D
	DB	060H,030H,018H,00CH,018H,030H,060H,000H ; > D_3E
	DB	078H,0CCH,00CH,018H,030H,000H,030H,000H ; ? D_3F

	DB	07CH,0C6H,0DEH,0DEH,0DEH,0C0H,078H,000H ; @ D_40
	DB	030H,078H,0CCH,0CCH,0FCH,0CCH,0CCH,000H ; A D_41
	DB	0FCH,066H,066H,07CH,066H,066H,0FCH,000H ; B D_42
	DB	03CH,066H,0C0H,0C0H,0C0H,066H,03CH,000H ; C D_43
	DB	0F8H,06CH,066H,066H,066H,06CH,0F8H,000H ; D D_44
	DB	0FEH,062H,068H,078H,068H,062H,0FEH,000H ; E D_45
	DB	0FEH,062H,068H,078H,068H,060H,0F0H,000H ; F D_46
	DB	03CH,066H,0C0H,0C0H,0CEH,066H,03EH,000H ; G D_47
	DB	0CCH,0CCH,0CCH,0FCH,0CCH,0CCH,0CCH,000H ; H D_48
	DB	078H,030H,030H,030H,030H,030H,078H,000H ; I D_49
	DB	01EH,00CH,00CH,00CH,0CCH,0CCH,078H,000H ; J D_4A
	DB	0E6H,066H,06CH,078H,06CH,066H,0E6H,000H ; K D_4B
	DB	0F0H,060H,060H,060H,062H,066H,0FEH,000H ; L D_4C
	DB	0C6H,0EEH,0FEH,0FEH,0D6H,0C6H,0C6H,000H ; M D_4C
	DB	0C6H,0E6H,0F6H,0DEH,0CEH,0C6H,0C6H,000H ; N D_4E
	DB	038H,06CH,0C6H,0C6H,0C6H,06CH,038H,000H ; O D_4F

	DB	0FCH,066H,066H,07CH,060H,060H,0F0H,000H ; P D_50
	DB	078H,0CCH,0CCH,0CCH,0DCH,078H,01CH,000H ; Q D_51
	DB	0FCH,066H,066H,07CH,06CH,066H,0E6H,000H ; R D_52
	DB	078H,0CCH,0E0H,070H,01CH,0CCH,078H,000H ; S D_53
	DB	0FCH,0B4H,030H,030H,030H,030H,078H,000H ; T D_54
	DB	0CCH,0CCH,0CCH,0CCH,0CCH,0CCH,0FCH,000H ; U D_55
	DB	0CCH,0CCH,0CCH,0CCH,0CCH,078H,030H,000H ; V D_56
	DB	0C6H,0C6H,0C6H,0D6H,0FEH,0EEH,0C6H,000H ; W D_57
	DB	0C6H,0C6H,06CH,038H,038H,06CH,0C6H,000H ; X D_58
	DB	0CCH,0CCH,0CCH,078H,030H,030H,078H,000H ; Y D_59
	DB	0FEH,0C6H,08CH,018H,032H,066H,0FEH,000H ; Z D_5A
	DB	078H,060H,060H,060H,060H,060H,078H,000H ; [ D_5B
	DB	0C0H,060H,030H,018H,00CH,006H,002H,000H ; BACKSLASH D_5C
	DB	078H,018H,018H,018H,018H,018H,078H,000H ; ] D_5D
	DB	010H,038H,06CH,0C6H,000H,000H,000H,000H ; CIRCUMFLEX D_5E
	DB	000H,000H,000H,000H,000H,000H,000H,0FFH ; _ D_5F

	DB	030H,030H,018H,000H,000H,000H,000H,000H ;   D_60
	DB	000H,000H,078H,00CH,07CH,0CCH,076H,000H ; LOWER CASE A D_61
	DB	0E0H,060H,060H,07CH,066H,066H,0DCH,000H ; L.C. B D_62
	DB	000H,000H,078H,0CCH,0C0H,0CCH,078H,000H ; L.C. C D_63
	DB	01CH,00CH,00CH,07CH,0CCH,0CCH,076H,000H ; L.C. D D_64
	DB	000H,000H,078H,0CCH,0FCH,0C0H,078H,000H ; L.C. E D_65
	DB	038H,06CH,060H,0F0H,060H,060H,0F0H,000H ; L.C. F D_66
	DB	000H,000H,076H,0CCH,0CCH,07CH,00CH,0F8H ; L.C. G D_67
	DB	0E0H,060H,06CH,076H,066H,066H,0E6H,000H ; L.C. H D_68
	DB	030H,000H,070H,030H,030H,030H,078H,000H ; L.C. I D_69
	DB	00CH,000H,00CH,00CH,00CH,0CCH,0CCH,078H ; L.C. J D_6A
	DB	0E0H,060H,066H,06CH,078H,06CH,0E6H,000H ; L.C. K D_6B
	DB	070H,030H,030H,030H,030H,030H,078H,000H ; L.C. L D_6C
	DB	000H,000H,0CCH,0FEH,0FEH,0D6H,0C6H,000H ; L.C. M D_6D
	DB	000H,000H,0F8H,0CCH,0CCH,0CCH,0CCH,000H ; L.C. N D_6E
	DB	000H,000H,078H,0CCH,0CCH,0CCH,078H,000H ; L.C. O D_6F

	DB	000H,000H,0DCH,066H,066H,07CH,060H,0F0H ; L.C. P D_70
	DB	000H,000H,076H,0CCH,0CCH,07CH,00CH,01EH ; L.C. Q D_71
	DB	000H,000H,0DCH,076H,066H,060H,0F0H,000H ; L.C. R D_72
	DB	000H,000H,07CH,0C0H,078H,00CH,0F8H,000H ; L.C. S D_73
	DB	010H,030H,07CH,030H,030H,034H,018H,000H ; L.C. T D_74
	DB	000H,000H,0CCH,0CCH,0CCH,0CCH,076H,000H ; L.C. U D_75
	DB	000H,000H,0CCH,0CCH,0CCH,078H,030H,000H ; L.C. V D_76
	DB	000H,000H,0C6H,0D6H,0FEH,0FEH,06CH,000H ; L.C. W D_77
	DB	000H,000H,0C6H,06CH,038H,06CH,0C6H,000H ; L.C. X D_78
	DB	000H,000H,0CCH,0CCH,0CCH,07CH,00CH,0F8H ; L.C. Y D_79
	DB	000H,000H,0FCH,098H,030H,064H,0FCH,000H ; L.C. Z D_7A
	DB	01CH,030H,030H,0E0H,030H,030H,01CH,000H ;   D_7B
	DB	018H,018H,018H,000H,018H,018H,018H,000H ;   D_7C
	DB	0E0H,030H,030H,01CH,030H,030H,0E0H,000H ;   D_7D
	DB	076H,0DCH,000H,000H,000H,000H,000H,000H ;   D_7E
	DB	000H,010H,038H,06CH,0C6H,0C6H,0FEH,000H ; DELTA D_7F

