'************************************************************************ 'CFTERM.BAS Terminal application for use with a KS0108 (or compatible display) 'Modified for the CrystalFlash CFAG12864B 128x64 Graphic LCD. 'The graphic LCD is connected to a Microchip(TM) PIC 16F877 with a 20Mhz xtal 'Written in MELabs PicBasicPro(TM) Ver 2.46 ' ' Revised for GL2 board Apr 2005 '================== NOT FOR COMMERICIAL USE ============================= ' ' Author: Ranjit Diol - COMPSys, April 2002 ' (c) Copyright Ranjit Diol, 2002 ' ' DISCLAIMER: This file is being released as non-commericial ' freeware. It is being provided "AS IS", neither the author, ' nor COMPSys LLC shall be held liable for any damages caused ' by its use.This application may be used in its entirety or ' in parts within some other application as long as the author ' is given credit for those parts used. ' ' Contact: rsdiol@compsys1.com for more information ' ' 'The OSC speed is 20Mhz, you may change this. However, the STROBE 'subroutine line 'pauseus 10' may need to be tweaked for your OSC speed ' ' 'You may change pin assignments to suit your own needs. ' ' Control Usage: ' Connect board to a PC terminal at 19000 baud 8N1 ' Apply power the LCD will display information and ' a "Ready:" message will appear in the PC's terminal ' to toggle the status of PortB pins 0,1 and 2 enter the following in the PC's ' terminal: Press the ESC key followed by the @ key, then enter B0 or B1 or B3 ' This will toggle the output state of the pins '==== CHANGE THE FOLLOWING TO SUIT YOUR BOARD ========== DEFINE LOADER_USED 1 'Required if ISP is used ADCON1 = 7 'Set pins to digital DEFINE OSC 20 'OSC freq NOTE: For any other 'you may have to change the pauseus 'in the 'Strobe' subroutine '********************************** 'LCD Constants (See KS0108 data sheet for more info) 'These Must be set for EACH side '******************************* line_0 con $b8 'LCD Lines 0-7 line_1 con $b9 Line_2 con $ba Line_3 con $bb line_4 con $bc Line_5 con $bd Line_6 con $be Line_7 con $bf disp_off con $3e 'Display off disp_on con $3f 'Display on col con $40 'Column 0-63 disp con $c0 'Display Line at top (disp+1 etc.) ESC con $1b '******** 'Mini-character constants 4x5 ee_offset_mini con $30 'ASCII Offset for the mini characters ee_addr_mini con $00 'Start location of mini characters mini_offset con $02 'Used for read loop mini_width con $03 'Mini character width 3x5 '5x7 larger characters char_width con $05 'larger char width ee_offset con $21 'Offset for characters in the table char_offset con $04 'Used for the read loop ee_addr con $00 'Start location of regular characters max_col con 128 'Maximum chars per LCD display max_per_side con 64 'Maximum chars per side clr_byte con 0 'Clear byte '************** 'PLEASE NOTE: '================================================================== 'Following is the GLiPIC pcb configuration 'Change the assignments as needed if you do not use the GLiPIC pcb '================================================================== 'GL2 board 'LCD control pins e var PORTC.2 'Enable clock cd var PORTC.0 'Command Low / Data High rw var PORTC.1 'Read High / Write Low rst var PORTC.5 'Reset LCD cs1 var PORTE.1 'Left Chip Select High = active cs2 var PORTE.2 'Right Chip Select High = active dat var PORTD 'Set pins for output TRISD = 0 TRISC.0 = 0 TRISC.1 = 0 TRISC.2 = 0 TRISC.5 = 0 TRISE.1 = 0 TRISE.2 = 0 'Other pins used 'Ouput Pins bport0 var PORTB.0 'Pins available for I/O bport1 var PORTB.1 bport2 var PORTB.2 'Input Pins bport3 var PORTB.3 bport4 var PORTB.4 bport5 var PORTB.5 'Output TRISB.0 = 0 TRISB.1 = 0 TRISB.2 = 0 'Input TRISB.3 = 1 TRISB.4 = 1 TRISB.5 = 1 'Serial Setup out_pin var PORTC.6 in_pin var PORTC.7 ser_baud con 32 '84=9600 Baud, 32=19200baud cmd var BYTE[2] 'Array for command bytes cmdvar var BYTE 'command variable cpin var BYTE 'command pin inbyte var BYTE 'char from terminal chr var BYTE 'chr to display i var BYTE 'general counter j var BYTE 'general counter k var BYTE 'general counter tmp1 var BYTE 'temp var tmp2 var BYTE 'temp var tmp3 var BYTE 'temp var col_pos var BYTE 'Vertical column position (0-128) line_pos var BYTE 'Line postion (0-7) term_flag var BYTE 'Terminal flag for line 7 tcount var BYTE 'Terminal line character counter col_loc var BYTE 'Column location pin_on var BYTE 'Pin state variable addr1 var WORD 'word variables for character sets addr2 var WORD addr3 var WORD addr var WORD addr = 0 pin_on = 0 chr = 0 dat = 0 i = 0 j = 0 k = 0 col_pos = 0 line_pos = 0 dat = 0 ' Clear PORTD cd = 0 rw = 0 e = 0 cs1 = 0 cs2 = 1 tcount = 0 col_loc = 0 rst = 1 pause 200 'Let things scolilize rst = 0 pause 10 ' Reset LCD rst = 1 pause 600 goto main 'Skip over subroutines '********** (GO)SUBROUTINES ************ 'Toggle E strobe: e = 1 pauseus 10 'Works for a 20MHz osc e = 0 return 'Initialize init: 'Initialization cd = 0 ' Set command mode cs1 = 0 ' Left Side on cs2 = 1 ' Right Side off for i = 1 to 2 dat = disp_off ' Display Off dat = disp ' Ram Line 0 gosub strobe ' Write the data dat = col ' col address = 0 gosub strobe dat = line_0 ' Page = 0 gosub strobe dat = disp_on ' Display On gosub strobe swap cs1,cs2 ' switch sides next cs1=0 cs2=1 return 'Initialize Clear all bytes in display ram clearall: cd = 0 ' Command mode dat = disp_off ' Display Off gosub strobe cs1=0 cs2=1 for i = 1 to 2 for j = line_0 to line_7 cd = 0 'Command mode gosub strobe ' Write the data dat = col ' col address = 0 gosub strobe dat = j gosub strobe cd = 1 ' Write mode for k = 1 to max_per_side dat =clr_byte ' Clear the displayed byte gosub strobe next next swap cs1,cs2 'Switch sides next cs1=1 cs2=0 cd=0 dat=line_0 gosub strobe dat = disp ' Ram Line 0 gosub strobe dat=col gosub strobe cs1=0 cs2=1 dat=line_0 gosub strobe dat = disp ' Ram Line 0 gosub strobe dat=col gosub strobe dat = disp_on 'display on gosub strobe cd = 1 ' Set Data command cs1 = 0 ' Left side active cs2 = 1 return 'Display character putchr: cd =1 addr1 = ((chr - ee_offset)*char_width) addr2 = addr1 + char_offset for addr = addr1 to addr2 gosub inc_pos if chr > $50 then addr3 = addr - $F0 gosub lookup_lgchr2 else gosub lookup_lgchr1 endif gosub strobe col_pos=col_pos+1 'Increment position next gosub addspc 'Add a space return 'Display a mini character putminichr: cd =1 addr1 = ee_addr_mini + ((chr - ee_offset_mini)*mini_width) addr2 = addr1 + mini_offset for addr = addr1 to addr2 gosub inc_pos gosub lookup_chr 'lookup table instead returns gl_dat gosub strobe col_pos=col_pos+1 'Increment position next gosub addspc 'Add a space return 'Add a space addspc: gosub inc_pos dat = clr_byte 'Blank char gosub strobe 'Toggle E col_pos=col_pos+1 'Increment position return 'Set position on display inc_pos: if col_pos = max_per_side then 'Mid screen cs1 = 1 'Switch sides cs2 = 0 cd = 0 'command mode dat = col gosub strobe 'Toggle E cd = 1 endif if col_pos = max_col then 'End of line cs1 = 0 cs2 = 1 line_pos = line_pos +1 col_pos = 0 'Reset col position cd = 0 'command mode dat = col 'Column 0 gosub strobe 'Toggle E cd = 1 'Data mode endif if line_pos = 8 then 'Line can only be 0-7 line_pos = 0 if term_flag = 1 then 'If terminal mode line_pos = 7 'keep at line 7 endif endif cd = 0 'command mode dat = line_0 + line_pos 'Set new line gosub strobe 'Toggle E cd = 1 'Data mode return 'Locates postion on LCD given col_pos and line_pos locate: if col_pos < (max_per_side - 1) then 'Switch to correct side cs1=0 cs2=1 col_loc = col_pos else cs1 =1 cs2 =0 col_loc = col_pos - max_per_side endif cd = 0 'Command mode dat=line_0 + line_pos gosub strobe 'Toggle E dat=col + col_loc gosub strobe 'Toggle E cd = 1 return 'Prints title on first line title: col_pos = 8 line_pos = 0 gosub locate for i= 0 to 19 lookup i,["Graphic LCD Terminal"],chr if chr=" " then for j = 1 to 3 gosub addspc next else gosub putchr endif next i 'Draw 2 graphic lines (lines 1 & 4) for j = 1 to 4 step 3 col_pos=0 line_pos =j gosub locate for i = 0 to (max_per_side - 1) dat = $14 gosub strobe next i col_pos=64 gosub locate for i = 0 to (max_col - 1) dat = $14 gosub strobe next i next j col_pos = 0 line_pos = 5 gosub locate for i= 0 to 25 lookup i,["SEND COMMANDS VIA TERMINAL"],chr if chr=" " then for j = 1 to 3 gosub addspc next else gosub putminichr endif next i 'Draw 1 graphic bar at line 6 col_pos=0 line_pos =6 gosub locate for i = 0 to (max_per_side - 1) dat = $3c gosub strobe next i col_pos=64 gosub locate for i = 0 to (max_col - 1) dat = $3c gosub strobe next i col_pos = 0 line_pos = 2 gosub locate for i= 0 to 9 lookup i,["PortB Pins"],chr if chr=" " then for j = 1 to 3 gosub addspc next else gosub putchr endif next col_pos = 64 line_pos = 2 gosub locate for i= 0 to 10 lookup i,["PortC State"],chr if chr=" " then for j = 1 to 3 gosub addspc next else gosub putchr endif next return 'Clear line 7 routine clearline7: cs1 = 1 cs2 = 0 for i = 1 to 2 cd = 0 dat = line_7 gosub strobe 'Toggle E dat = col gosub strobe 'Toggle E cd = 1 for j = 0 to max_per_side dat = clr_byte gosub strobe 'Toggle E next j swap cs1,cs2 next i cs1 = 0 cs2 = 1 col_pos = 0 line_pos = 7 return 'Terminal command subroutine Toggle B0-B2 do_cmds: if cmd[0]= "B" or cmd[0] = "b" then cpin=cmd[1] - $30 'Convert ASCII to number if cpin = 0 then toggle bport0 tmp1 = line_pos tmp2 = col_pos line_pos = 3 col_pos = 0 gosub locate if PORTB.0=1 then chr = "1" else chr = "0" endif gosub putchr line_pos = tmp1 col_pos = tmp2 gosub locate endif if cpin = 1 then toggle bport1 tmp1 = line_pos tmp2 = col_pos line_pos = 3 col_pos = 8 gosub locate if PORTB.1=1 then chr = "1" else chr = "0" endif gosub putchr line_pos = tmp1 col_pos = tmp2 gosub locate endif if cpin = 2 then toggle bport2 tmp1 = line_pos tmp2 = col_pos line_pos = 3 col_pos = 18 gosub locate if PORTB.2=1 then chr = "1" else chr = "0" endif gosub putchr line_pos = tmp1 col_pos = tmp2 gosub locate endif 'if cpin = 5 then 'toggle bport5 ' toggle bport0 'tmp1 = line_pos 'tmp2 = col_pos ' line_pos = 3 ' col_pos = 28 ' gosub locate ' if PORTB.5=1 then ' chr = "1" ' else ' chr = "0" ' endif ' gosub putchr ' line_pos = tmp1 ' col_pos = tmp2 ' gosub locate ' endif ' if cpin = 6 then ' toggle bport6 ' toggle bport0 ' tmp1 = line_pos ' tmp2 = col_pos ' line_pos = 3 ' col_pos = 38 ' gosub locate ' if PORTB.6=1 then ' chr = "1" ' else ' chr = "0" ' endif ' gosub putchr ' line_pos = tmp1 ' col_pos = tmp2 ' gosub locate ' endif ' if cpin = 7 then ' toggle bport7 ' toggle bport0 ' tmp1 = line_pos ' tmp2 = col_pos ' line_pos = 3 ' col_pos = 48 ' gosub locate ' ' if PORTB.7=1 then ' chr = "1" ' else ' chr = "0" ' endif ' gosub putchr ' line_pos = tmp1 ' col_pos = tmp2 ' gosub locate ' endif endif chr=cmd[0] return 'Checks PORTB Pins 0-5 chk_portb: tmp1 = line_pos 'Save postion tmp2 = col_pos tmp3 = chr line_pos = 3 col_pos = 0 gosub locate if PORTB.0=1 then chr = "1" else chr = "0" endif gosub putchr col_pos = 8 gosub locate if PORTB.1=1 then chr = "1" else chr = "0" endif gosub putchr col_pos = 18 gosub locate if PORTB.2=1 then chr = "1" else chr = "0" endif gosub putchr col_pos = 28 gosub locate if PORTB.3=1 then chr = "1" else chr = "0" endif gosub putchr col_pos = 38 gosub locate if PORTB.4=1 then chr = "1" else chr = "0" endif gosub putchr col_pos = 48 gosub locate if PORTB.5=1 then chr = "1" else chr = "0" endif gosub putchr line_pos = tmp1 'Restore old values col_pos = tmp2 chr = tmp3 gosub locate return 'Checks PORTC Pin activity 0-7 chk_portc: tmp1 = line_pos 'Save postion tmp2 = col_pos tmp3 = chr line_pos = 3 col_pos = 64 gosub locate if PORTC.0=1 then chr = "1" else chr = "0" endif gosub putchr col_pos = 72 gosub locate if PORTC.1=1 then chr = "1" else chr = "0" endif gosub putchr col_pos = 80 gosub locate if PORTC.2=1 then chr = "1" else chr = "0" endif gosub putchr col_pos = 88 gosub locate if PORTC.3=1 then chr = "1" else chr = "0" endif gosub putchr col_pos = 96 gosub locate if PORTC.4=1 then chr = "1" else chr = "0" endif gosub putchr col_pos = 104 gosub locate if PORTC.5=1 then chr = "1" else chr = "0" endif gosub putchr col_pos = 112 gosub locate if PORTC.6=1 then chr = "1" else chr = "0" endif gosub putchr col_pos = 120 gosub locate if PORTC.7=1 then chr = "1" else chr = "0" endif gosub putchr line_pos = tmp1 'Restore old values col_pos = tmp2 chr = tmp3 gosub locate return '************ 'MAIN PROGRAM '************ main: gosub init gosub clearall 'Initialize and clear display gosub title gosub chk_portb 'Terminal Section col_pos = 0 line_pos = 7 'Setup terminal gosub locate 'for using line 7 cs1=0 cs2=1 cd = 0 dat = col gosub strobe dat = line_7 gosub strobe cd = 1 term_flag = 1 ' Flag to use line 7 only serout2 out_pin,ser_baud,["READY:",10,13] '******************** MAIN TERMINAL LOOP ************************ Term: 'Other subroutines can be inserted in this 500ms loop gosub chk_portb 'Check PORTB status gosub chk_portc 'Check PORTC status '**************************************************************** serin2 in_pin, ser_baud,500,term,[chr] ' 500 ms timeout,adjust as needed if chr= ESC then '$1b Check if command key *, if so serout2 out_pin,ser_baud,["CMD:"] serin2 in_pin, ser_baud,[wait ("@"),STR cmd\2] 'get command characters serout2 out_pin,ser_baud,[STR cmd\2,10,13] gosub do_cmds 'and branch to the command endif 'sub-routines if (chr = $08) AND (tcount > 5) then 'chk for back space col_pos = col_pos - 6 tcount = tcount - 6 cd = 0 dat = (col + col_pos) gosub strobe cd = 1 for i = 0 to 5 dat = $0 gosub strobe next endif if chr = $20 then 'If space ($20) then gosub addspc 'add a space endif if (chr<$21) OR (chr> $7e) then term 'Char not in our eeprom gosub putchr 'Display the character tcount = tcount + 6 if tcount > 127 then gosub clearline7 tcount = 0 endif goto term 'Do it forever! '************************************************* '************************************************* 'Character lookup tables lookup_chr: 'for i = 0 to 128 'Mini 3x5 character set lookup addr,[_ $1F,$11,$1F,_ '0 30 $1,$1F,$0,_ '1 31 $1D,$15,$17,_ '2 32 $15,$15,$1F,_ '3 33 $C,$A,$1F,_ '4 34 $17,$15,$1D,_ '5 35 $1F,$15,$1C,_ '6 36 $19,$5,$3,_ '7 37 $1F,$15,$1F,_ '8 38 $17,$15,$1F,_ '9 39 $0,$1B,$1B,_ ': 3a $18,$18,$00,_ '. instead of ; 3b $10,$0B,$03,_ $04,$0A,$11,_ '< 3c $0A,$0A,$0A,_ '= 3d $11,$0A,$04,_ '> 3e $00,$15,$07,_ '? 3f $0E,$11,$0D,_ '@ 40 $1E,$5,$1E,_ 'A 41 $1F,$15,$E,_ 'B 42 $1F,$11,$11,_ 'C 43 $1F,$11,$E,_ 'D 44 $1F,$15,$11,_ 'E 45 $1F,$5,$1,_ 'F 46 $1F,$11,$1D,_ 'G 47 $1F,$4,$1F,_ 'H 48 $11,$1F,$11,_ 'I 49 $18,$10,$1F,_ 'J 4a $1F,$A,$11,_ 'K 4b $1F,$10,$10,_ 'L 4c $1F,$6,$1F,_ 'M 4d $1F,$E,$1F,_ 'N 4e $E,$11,$E,_ 'O 4f $1F,$5,$2,_ 'P 50 $E,$9,$16,_ 'Q 51 $1F,$5,$1B,_ 'R 52 $16,$15,$D,_ 'S 53 $1,$1F,$1,_ 'T 54 $1F,$10,$1F,_ 'U 55 $F,$10,$F,_ 'V 56 $1F,$8,$1F,_ 'W 57 $1B,$4,$1B,_ 'X 58 $3,$1C,$3,_ 'Y 59 $19,$15,$13_ 'Z 5a ],dat return 'Table 0-239 elements (240/5=48 chars) , last char P starts at 234 lookup_lgchr1: lookup addr,[_ $0,$0,$4F,$0,$0,_ '33 - ! - 21 $0,$7,$0,$7,$0,_ '34 - " - 22 $14,$7F,$14,$7F,$14,_ '35 - # - 23 $24,$2A,$7F,$2A,$12,_ '36 - $ - 24 $23,$13,$8,$64,$62,_ '37 - % - 25 $36,$49,$55,$22,$50,_ '38 - & - 26 $0,$5,$3,$0,$0,_ '39 - ' - 27 $1C,$22,$41,$0,$0,_ '40 - ( - 28 $0,$0,$41,$22,$1C,_ '41 - ) - 29 $14,$8,$3E,$8,$14,_ '42 - * - 2A $8,$8,$3E,$8,$8,_ '43 - + - 2B $0,$50,$30,$0,$0,_ '44 - , - 2C $8,$8,$8,$8,$8,_ '45 - - - 2D $0,$60,$60,$0,$0,_ '46 - . - 2E $20,$10,$8,$4,$2,_ '47 - / - 2F $3E,$51,$49,$45,$3E,_ '48 - 0 - 30 $0,$42,$7F,$40,$0,_ '49 - 1 - 31 $42,$61,$51,$49,$46,_ '50 - 2 - 32 $21,$41,$45,$4B,$31,_ '51 - 3 - 33 $18,$14,$12,$7F,$10,_ '52 - 4 - 34 $27,$45,$45,$45,$39,_ '53 - 5 - 35 $3C,$4A,$49,$49,$30,_ '54 - 6 - 36 $1,$71,$9,$5,$3,_ '55 - 7 - 37 $36,$49,$49,$49,$36,_ '56 - 8 - 38 $6,$49,$49,$29,$1E,_ '57 - 9 - 39 $0,$36,$36,$0,$0,_ '58 - : - 3A $0,$56,$36,$0,$0,_ '59 - ; - 3B $8,$14,$22,$41,$0,_ '60 - < - 3C $14,$14,$14,$14,$14,_ '61 - = - 3D $0,$41,$22,$14,$8,_ '62 - > - 3E $2,$1,$51,$9,$6,_ '63 - ? - 3F $32,$49,$79,$41,$3E,_ '64 - @ - 40 $7E,$11,$11,$11,$7E,_ '65 - A - 41 $7F,$49,$49,$49,$36,_ '66 - B - 42 $3E,$41,$41,$41,$22,_ '67 - C - 43 $7F,$41,$41,$22,$1C,_ '68 - D - 44 $7F,$49,$49,$49,$41,_ '69 - E - 45 $7F,$9,$9,$9,$1,_ '70 - F - 46 $3E,$41,$49,$49,$7A,_ '71 - G - 47 $7F,$8,$8,$8,$7F,_ '72 - H - 48 $0,$41,$7F,$41,$0,_ '73 - I - 49 $20,$40,$41,$3F,$1,_ '74 - J - 4A $7F,$8,$14,$22,$41,_ '75 - K - 4B $7F,$40,$40,$40,$40,_ '76 - L - 4C $7F,$2,$C,$2,$7F,_ '77 - M - 4D $7F,$4,$8,$10,$7F,_ '78 - N - 4E $3E,$41,$41,$41,$3E,_ '79 - O - 4F $7F,$9,$9,$9,$6_ '80 - P - 50 'Last Element 239 of 0-239 ],dat return 'Table2 0-229 elements (230/5=46 chars) , last char ~ starts at 225 lookup_lgchr2: lookup addr3,[_ $3E,$41,$51,$21,$5E,_ '81 - Q - 51 $7F,$9,$19,$29,$46,_ '82 - R - 52 $46,$49,$49,$49,$31,_ '83 - S - 53 $01,$01,$7F,$01,$01,_ '84 - T - 54 $3F,$40,$40,$40,$3F,_ '85 - U - 55 $1F,$20,$40,$20,$1F,_ '86 - V - 56 $3F,$40,$38,$40,$3F,_ '87 - W - 57 $63,$14,$8,$14,$63,_ '88 - X - 58 $7,$8,$70,$8,$7,_ '89 - Y - 59 $61,$51,$49,$45,$43,_ '90 - Z - 5A $7F,$41,$41,$0,$0,_ '91 - [ - 5B $2,$4,$8,$10,$20,_ '92 - \ - 5C $0,$0,$41,$41,$7F,_ '93 - ] - 5D $4,$2,$1,$2,$4,_ '94 - ^ - 5E $40,$40,$40,$40,$40,_ '95 - _ - 5F $0,$1,$2,$4,$0,_ '96 - ` - 60 $20,$54,$54,$54,$78,_ '97 - a - 61 $7F,$48,$44,$44,$38,_ '98 - b - 62 $38,$44,$44,$44,$20,_ '99 - c - 63 $38,$44,$44,$48,$7F,_ '100 d - 64 $38,$54,$54,$54,$18,_ '101 e - 65 $8,$7E,$9,$1,$2,_ '102 f - 66 $C,$52,$52,$52,$3E,_ '103 g - 67 $7F,$8,$4,$4,$78,_ '104 h - 68 $0,$44,$7D,$40,$0,_ '105 i - 69 $0,$20,$40,$44,$3D,_ '106 j - 6A $7F,$10,$28,$44,$0,_ '107 k - 6B $0,$41,$7F,$40,$0,_ '108 l - 6C $7C,$4,$18,$4,$78,_ '109 m - 6D $7C,$8,$4,$4,$78,_ '110 n - 6E $38,$44,$44,$44,$38,_ '111 o - 6F $7C,$14,$14,$14,$8,_ '112 p - 70 $8,$14,$14,$18,$7C,_ '113 q - 71 $7C,$8,$4,$4,$8,_ '114 r - 72 $48,$54,$54,$54,$20,_ '115 s - 73 $4,$3F,$44,$40,$20,_ '116 t - 74 $3C,$40,$40,$20,$7C,_ '117 u - 75 $1C,$20,$40,$20,$1C,_ '118 v - 76 $3C,$40,$30,$40,$3C,_ '119 w - 77 $44,$28,$10,$28,$44,_ '120 x - 78 $C,$50,$50,$50,$3C,_ '121 y - 79 $44,$64,$54,$4C,$44,_ '122 z - 7A $8,$36,$41,$0,$0,_ '123 { - 7B $0,$0,$7F,$0,$0,_ '124 | - 7C $0,$0,$41,$36,$8,_ '125 } - 7D $0,$8,$4,$8,$4_ '126 ~ - 7E ],dat return end '*************** 'END OF PROGRAM '***************