'-----------LCD for Nokia 3310 and Mega AVR---------------------------------------
'
'Based on Louis Frigon program in C: "Nokia LCD Library" at www.microsyl.com
'and
'Darek Dobrowolski program in Bascom: "Wysterowanie wyświetlacza LCD LPH7779(Nokia 3310) przez ATmega128L cz.1,2,3" at
'http://maxparadys.w.interia.pl/avr.htm
'
'I think bitmap prepared with FastLCD from http://www.fastavr.com/
'
'
'By RGB 12.06.05
'
'Bascom AVR 1.11.7.7
'--------------------------------------------------------------------------------

'Set in Options, Compiler:
'Hwstc = 128
'Softstc = 128
'Frame = 128

$regfile = "m8def.dat"
$crystal = 4000000


'LCD VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
Config Pinb.0 = Output
Config Pinb.2 = Output
Config Pinb.1 = Output

Config Pinb.3 = Output
Config Pinb.5 = Output
Enable Interrupts
Enable Spi

Config Spi = Hard , Data Order = Msb , Master = Yes , Polarity = Low , Phase = 1 , Clockrate = 4 , Noss = 1
Spiinit

'---------------------- LCD vars  ----------------------------
Dim Lcd_data As Byte
Dim Updatelcd As Bit                                        '1 = Update
Dim Lcd_cache(504) As Byte                                  'data to send to LCD RAM
Dim Lcdcacheidx As Word                                     'pointer
Dim Ch As Byte


'---------------------- Aliases ------------------------------------
Lcd_dc
Alias Portb.0                                        'low = command mode, high = data
Lcd_sce
Alias Portb.2                                       'low = enable LCD SPI, high = SPI disable
Lcd_rst
Alias Portb.1                                       'low = reset

'--------------------- LCD constants -----------------------------
Const Lcd_inver = &H0D                                      'inverted  screen (after normal command mode)
Const Lcd_normal = &H0C                                     'normal  screen (after normal command mode)
Const Test = &H09                                           'All pixels on (after normal command mode)
Const Normal_command = &H20                                 'normal command mode

'--------------------- LCD Sub declarations -------------------------
Declare Sub Lcd_cmd(byval Command As Byte )
Declare Sub Lcdinit
Declare Sub Lcdclear
Declare Sub Lcdupdate
Declare Sub Lcdgoxy(byval X As Byte , Byval Y As Byte)
'from 1,1 to 14,6
Declare Sub Lcdchr(byval Ch As Byte , Byval Lcdfontsize As Byte , Byval Ch_inv As Byte)
'ch=character, Lcdfontsize 1 = high 1, Lcdfontsize 2=high 2, Ch_inv 1=inverse
Declare Sub Lcdstr(byval Lcdstring As String , Byval Lcdfontsize As Byte , Byval Ch_inv As Byte)
'lcdstring = string to LCD, Lcdfontsize 1 = high 1, Lcdfontsize 2=high 2, Ch_inv 1=inverse
Declare Sub Lcdpixel(byval X As Byte , Byval Y As Byte , Byval Pixelmode As Byte )
'x 1-84, y 1-48, pixelmode 0=OFF, pixelmode 1=ON, pixelmode 2=XOR
Declare Sub Lcdline(byval X1 As Byte , Byval Y1 As Byte , Byval X2 As Byte , Byval Y2 As Byte , Byval Pixelmode As Byte )
'xy1=start, xy2=end of line, pixelmode as in Lcdpixel
Declare Sub Lcdrectangle(byval X3 As Byte , Byval Y3 As Byte , Byval Wide As Byte , Byval Height As Byte)
Declare Sub Show(byval Xx As Byte , Byval Yy As Byte)
'show bitmap from program memory. XX 1 to (84-_width), YY 1 to 6 (n*8)
Declare Sub Clearshow(byval Xx As Byte , Byval Yy As Byte)
'clear window last show
'LCD ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

'--------------------- LCD Init ----------------------------------
Call Lcdinit                                                'must be first in program!!!

'vvvvvvvvvvvvvvvvvvvv DEMO VVVVVVVVVVVVVVVVVVVVVVVVVVV

Dim Ii As Byte
Dim Wsk As Byte
Wsk
= 0

Do
   Lcdclear

   Lcdgoxy 6
, 5
   Lcdstr
"Text" , 1 , 0
   Lcdupdate
  
Wait 2

   Lcdgoxy 1
, 1
   Lcdstr
"Normal" , 1 , 0
   Lcdupdate
  
Wait 2

   Lcdgoxy 9
, 1
   Lcdstr
"Inwers" , 1 , 1
   Lcdupdate
  
Wait 2

   Lcdgoxy 1
, 3
   Lcdstr
"Double" , 2 , 0
   Lcdupdate
  
Wait 2

   Lcdgoxy 1
, 3
   Lcdstr
"Bitmap" , 2 , 0
  
Restore Egypt
   Show 1
, 4
   Lcdupdate
  
Wait 3

   Lcdclear

   Lcdgoxy 3
, 3
   Lcdstr
"  Pixels " , 1 , 0
   Lcdupdate
  
Wait 1

  
For Ii = 1 To 84
     
If Wsk = 0 Then
         Wsk
= 1
     
Else
         Wsk
= 0
     
End If
      Lcdpixel Ii
, 8 , Wsk
      Lcdupdate
     
Waitms 10
  
Next Ii

   Lcdgoxy 3
, 3
   Lcdstr
"  Line   " , 1 , 0
   Lcdupdate
  
Wait 1
   Lcdline 1
, 1 , 84 , 48 , 1
   Lcdupdate
  
Wait 3

   Lcdgoxy 3
, 3
   Lcdstr
"  Line XOR" , 1 , 1
   Lcdgoxy 3
, 4
   Lcdstr
"          " , 1 , 1
   Lcdupdate
  
Wait 1
   Lcdline 84
, 1 , 1 , 48 , 2
   Lcdupdate
  
Wait 3

   Lcdgoxy 3
, 3
   Lcdstr
"Rectangle " , 1 , 0
   Lcdupdate
  
Wait 1

   Lcdrectangle 3
, 3 , 80 , 43
   Lcdupdate
  
Wait 2

 
Loop

'^^^^^^^^^^^^^^^^^^^^^ DEMO ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^



'  ----------------------- LCD subroutines -----------------------

'----------------------- Lcd_cmd (Command) ----------------------
Sub Lcd_cmd(byval Command As Byte )
  
Reset Lcd_sce                                            ' SPI enable
  
Reset Lcd_dc                                             ' command mode
  
Spiout Command , 1
  
Set Lcd_dc                                               ' data mode
  
Set Lcd_sce                                              ' data mode
End Sub

'----------------------- Lcdinit ------------------------------
Sub Lcdinit
  
Waitms 5
  
Reset Lcd_rst                                            'RESET LCD
  
Waitms 5
  
Set Lcd_rst                                              'end of reset
  
Set Lcd_sce                                              'in Lcd_cmd() will be "L"!
  
Call Lcd_cmd(&H21)                                       'extended command mode
  
Call Lcd_cmd(&Hf8)                                       'c8LCD contrast (mayby you must change)
  
Call Lcd_cmd(&H06)                                       'temperature compensation
  
Call Lcd_cmd(&H13)                                       'bias 1:48
  
Call Lcd_cmd(&H20)                                       'normal command mode
  
Call Lcd_cmd(&H0c)                                       'normal display
  
Call Lcd_cmd(&H40)                                       'Y=0
  
Call Lcd_cmd(&H80)                                       'X=0
  
Call Lcdclear
  
Call Lcdupdate
End Sub

'---------------------- Lcdclear ------------------------------
Sub Lcdclear
  
Local I As Word
  
For I = 1 To 504
       Lcd_cache
(i) = 0
  
Next I
'    Lcdcacheidx = 1
End Sub
'--------------------- Lcdupdate -------------------------------
'copy full LCD_cache to LCD RAM
Sub Lcdupdate
  
Local I As Word
  
Call Lcd_cmd(&H80)                                       'sets 0 X-addr of RAM
  
Call Lcd_cmd(&H40)                                       'sets 0 Y-addr of RAM
  
For I = 1 To 504
     Lcd_data
= Lcd_cache(i)
    
Reset Lcd_sce                                          'SPI to LCD enable
    
Set Lcd_dc                                             'Data
    
Spiout Lcd_data , 1
    
While Spsr.7 = 1                                       'wait until SPIF = 0
    
Wend
    
Reset Lcd_dc
    
Set Lcd_sce                                            'SPI to LCD disable
  
Next I
   Updatelcd
= 0
End Sub

'--------------------- Lcdgoxy--------------------------------
Sub Lcdgoxy(byval X As Byte , Byval Y As Byte)              'from 1,1 to 14,6
  
Local I As Word
  
Local J As Word
   X
= X - 1
   I
= X
   I
= I * 6
   Y
= Y - 1
   J
= Y
   J
= Y * 84
   Lcdcacheidx
= I + J
  
Incr Lcdcacheidx                                         'Lcdchacheidx 1-504!
End Sub

'------------------ Lcdchr-------------------------------------
Sub Lcdchr(byval Ch As Byte , Byval Lcdfontsize As Byte , Byval Ch_inv As Byte)       '1 character on LCD
  
Local I As Byte
  
Local J As Word
  
Local K As Byte
  
Local Ba As Byte
  
Local Bb As Byte
  
Local Tmpidx As Word
  
Local Tmpidx1 As Word
  
If Ch < &H20 Then Ch = 92
  
If Ch > &H7B Then Ch = 92
   J
= Ch - 32
   J
= J * 5
  
If Lcdfontsize = 1 Then
     
For I = 1 To 6
         K
= Lookup(j , Fontlookup)
        
If Ch_inv = 1 Then                                 'negative
           
If I = 6 Then                                   'black for 6 row
               K
= 255
           
Else
               K
= K Xor &HFF
           
End If
        
Else
           
If I = 6 Then                                   'white for 6 row
               K
= 0
           
End If
        
End If

         Lcd_cache
(lcdcacheidx) = K
        
Incr Lcdcacheidx
        
Incr J
     
Next I
  
Else                                                     'high 2
      Tmpidx
= Lcdcacheidx - 84                             'signs go up and can't be at 1,x
     
For I = 1 To 6
        
If I = 6 Then
           
If Ch_inv = 1 Then
               K
= 255
           
Else
               K
=If
        
Else
            K
= Lookup(j , Fontlookup)
           
If Ch_inv = 1 Then
               K
= K Xor &HFF
           
End If
        
End If
         Ba
.0 = K.0
         Ba
.1 = K.0
         Ba
.2 = K.1
         Ba
.3 = K.1
         Ba
.4 = K.2
         Ba
.5 = K.2
         Ba
.6 = K.3
         Ba
.7 = K.3

         Bb
.0 = K.4
         Bb
.1 = K.4
         Bb
.2 = K.5
         Bb
.3 = K.5
         Bb
.4 = K.6
         Bb
.5 = K.6
         Bb
.6 = K.7
         Bb
.7 = K.7

         Lcd_cache
(tmpidx) = Ba                             'up of character
        
Incr Tmpidx
         Lcd_cache
(tmpidx) = Ba                             'double wide
        
Incr Tmpidx
         Tmpidx1
= Tmpidx + 82
         Lcd_cache
(tmpidx1) = Bb                            'down of character
        
Incr Tmpidx1
         Lcd_cache
(tmpidx1) = Bb                            'double wide
        
Incr J
     
Next I
      Lcdcacheidx
= Lcdcacheidx + 12                        '6+6
 
End If
  Kon_lcdchr
:
End Sub
'-------------------- Lcdstr----------------------------------------
Sub Lcdstr(lcdstring As String , Lcdfontsize As Byte , Ch_inv As Byte)
  
Local M As Byte
  
Local N As String * 1
  
For M = 1 To Len(lcdstring)
      N
= Mid(lcdstring , M , 1)
      Ch
= Asc(n)
     
Call Lcdchr(ch , Lcdfontsize , Ch_inv )
  
Next M
End Sub
'------------------- Lcdpixel --------------------------------------
Sub Lcdpixel(x As Byte , Y As Byte , Pixelmode As Byte )
  
Local Index As Word
  
Local Offset As Byte
  
Local I As Byte
  
If X > 84 Then Goto End_lcdpixel
  
If Y > 48 Then Goto End_lcdpixel
   Y
Y / 8
   Index
= Index * 84
   Index
= Index + X
   Offset
= Y / 8
   Offset
= Offset * 8
   Offset
= Y - Offset
   Lcd_data
= Lcd_cache(index)
   I
= 1
  
Shift I , Left , Offset
  
Select Case Pixelmode
  
Case 0:                                                  'pixel off
      I
= I Xor &HFF
      Lcd_data
= Lcd_data And I
  
Case 1:                                                  'pixel on
      Lcd_data
= Lcd_data Or I
  
Case 2:                                                  'pixel xor
      Lcd_data
= Lcd_data Xor I
  
End Select
   Lcd_cache
(index) = Lcd_data
End_lcdpixel
:
End Sub
'----------------------- Lcdline ------------------------------------
Sub Lcdline(x1 As Byte , Y1 As Byte , X2 As Byte , Y2 As Byte , Pixelmode As Byte )
  
Local Dx As Integer
  
Local Dy As Integer
  
Local Stepx As Integer
  
Local Stepy As Integer
  
Local Fraction As Integer
  
Local I As Byte

   Dy
= Y2 - Y1
   Dx
= X2 - X1

  
If Dy < 0 Then
      Dy
= -dy
      Stepy
= -1
  
Else
      Stepy
= 1
  
End If
  
If Dx < 0 Then
      Dx
= -dx
      Stepx
= -1
  
Else
      Stepx
= 1
  
End If
  
Shift Dx , Left , 1                                      '-2
  
Shift Dy , Left , 1                                      '-2
  
Call Lcdpixel(x1 , Y1 , Pixelmode)

  
If Dx > Dy Then
      I
= Dx
     
Shift I , Right , 1                                   '/2
      Fraction
= Dy - I
     
While X1 <> X2
        
If Fraction >= 0 Then
            Y1
= Y1 + Stepy
            Fraction
= Fraction - Dx
        
End If
         X1
= X1 + Stepx
         Fraction
= Fraction + Dy
        
Call Lcdpixel(x1 , Y1 , Pixelmode)
     
Wend
  
Else
      I
= Dy
     
Shift I , Right , 1                                   '/2
      Fraction
= Dx - I
     
While Y1 <> Y2
        
If Fraction >= 0 Then
            X1
= X1 + Stepx
            Fraction
= Fraction - Dy
        
End If
         Y1
= Y1 + Stepy
         Fraction
= Fraction + Dx
        
Call Lcdpixel(x1 , Y1 , Pixelmode)
     
Wend
  
End If
Updatelcd
= 1
End Sub

'  ----------------------- LCDrectangle -----------------------

Sub Lcdrectangle(x3 As Byte , Y3 As Byte , Wide As Byte , Height As Byte)
    Wide
= X3 + Wide
   
Decr Wide
    Height
= Y3 + Height
   
Decr Height
   
Call Lcdline(x3 , Y3 , Wide , Y3 , 1 )
   
Call Lcdline(x3 , Height , Wide , Height , 1 )
   
Call Lcdline(x3 , Y3 , X3 , Height , 1 )
   
Call Lcdline(wide , Y3 , Wide , Height , 1 )
End Sub

 
'--------------------- Show ----------------------
 
'XX 1 to (84-_width), YY 1 to 6 (n*8)
 
'must be RESTORE "data to show" before CALL it subrotine
Sub Show(xx As Byte , Yy As Byte)
  
Local Swidth As Byte
  
Local Shigh As Byte
  
Local Cacheidx As Word
  
Local I As Byte
  
Local J As Byte
  
Local K As Byte
  
Local L As Byte
  
Read Swidth
  
Read Shigh
   K
= Yy + Shigh
   K
= K - 1
   L
= Xx + Swidth
   L
= L - 1
  
If K > 6 Then Goto End_show
  
If L > 84 Then Goto End_show

  
For I = Yy To K
   Cacheidx
= I - 1
      Cacheidx
= Cacheidx * 84
      Cacheidx
= Cacheidx + Xx
     
For J = Xx To L
        
Read Ch
         Lcd_cache
(cacheidx) = Ch
        
Incr Cacheidx
     
Next J
  
Next I
   Updatelcd
= 1
   End_show
:
End Sub

'--------------------- ClearShow ----------------------
'XX 1 to (84-_width), YY 1 to 6 (n*8)
'must be RESTORE "data to show" before CALL it subrotine
Sub Clearshow(xx As Byte , Yy As Byte)
  
Local Swidth As Byte
  
Local Shigh As Byte
  
Local Cacheidx As Word
  
Local I As Byte
  
Local J As Byte
  
Local K As Byte
  
Local L As Byte
  
Read Swidth
  
Read Shigh
   K
= Yy + Shigh
   K
= K - 1
   L
= Xx + Swidth
   L
= L - 1
  
For I = Yy To K
   Cacheidx
= I - 1
      Cacheidx
= Cacheidx * 84
      Cacheidx
= Cacheidx + Xx
     
For J = Xx To L
         Lcd_cache
(cacheidx) = 0
        
Incr Cacheidx
     
Next J
  
Next I
   Updatelcd
= 1
End Sub


End                                                         'end program                                                                             'end program


'                              Character generator

'     This table defines the standard ASCII characters in a 5x7 dot format.
'------------------------------------------------------------------------------/
$data
Fontlookup
:
Data &H00 , &H00 , &H00 , &H00 , &H00 ,                     ' sp
Data &H00 , &H00 , &H2F , &H00 , &H00 ,                     ' !
Data &H00 , &H07 , &H00 , &H07 , &H00 , ' "
Data &H14 , &H7F , &H14 , &H7F , &H14 ,                     ' #
Data &H24 , &H2A , &H7F , &H2A , &H12 ,                     ' $
Data &HC4 , &HC8 , &H10 , &H26 , &H46 ,                     ' %
Data &H36 , &H49 , &H55 , &H22 , &H50 ,                     ' &
Data &H00 , &H05 , &H03 , &H00 , &H00 ,                     ' '
Data &H00 , &H1C , &H22 , &H41 , &H00 ,                     ' (
Data &H00 , &H41 , &H22 , &H1C , &H00 ,                     ' )
Data &H14 , &H08 , &H3E , &H08 , &H14 ,                     ' -
Data &H08 , &H08 , &H3E , &H08 , &H08 ,                     ' +
Data &H00 , &H00 , &H50 , &H30 , &H00 ,                     ' ,
Data &H10 , &H10 , &H10 , &H10 , &H10 ,                     ' -
Data &H00 , &H60 , &H60 , &H00 , &H00 ,                     ' .
Data &H20 , &H10 , &H08 , &H04 , &H02 ,                     ' /
Data &H3E , &H51 , &H49 , &H45 , &H3E ,                     ' 0
Data &H00 , &H42 , &H7F , &H40 , &H00 ,                     ' 1
Data &H42 , &H61 , &H51 , &H49 , &H46 ,                     ' 2
Data &H21 , &H41 , &H45 , &H4B , &H31 ,                     ' 3
Data &H18 , &H14 , &H12 , &H7F , &H10 ,                     ' 4
Data &H27 , &H45 , &H45 , &H45 , &H39 ,                     ' 5
Data &H3C , &H4A , &H49 , &H49 , &H30 ,                     ' 6
Data &H01 , &H71 , &H09 , &H05 , &H03 ,                     ' 7
Data &H36 , &H49 , &H49 , &H49 , &H36 ,                     ' 8
Data &H06 , &H49 , &H49 , &H29 , &H1E ,                     ' 9
Data &H00 , &H36 , &H36 , &H00 , &H00 ,                     ' :
Data &H00 , &H56 , &H36 , &H00 , &H00 ,                     ' ;
Data &H08 , &H14 , &H22 , &H41 , &H00 ,                     ' <
Data &H14 , &H14 , &H14 , &H14 , &H14 ,                     ' =
Data &H00 , &H41 , &H22 , &H14 , &H08 ,                     ' >
Data &H02 , &H01 , &H51 , &H09 , &H06 ,                     ' ?
Data &H32 , &H49 , &H59 , &H51 , &H3E ,                     ' @
Data &H7E , &H11 , &H11 , &H11 , &H7E ,                     ' A
Data &H7F , &H49 , &H49 , &H49 , &H36 ,                     ' B
Data &H3E , &H41 , &H41 , &H41 , &H22 ,                     ' C
Data &H7F , &H41 , &H41 , &H22 , &H1C ,                     ' D
Data &H7F , &H49 , &H49 , &H49 , &H41 ,                     ' E
Data &H7F , &H09 , &H09 , &H09 , &H01 ,                     ' F
Data &H3E , &H41 , &H49 , &H49 , &H7A ,                     ' G
Data &H7F , &H08 , &H08 , &H08 , &H7F ,                     ' H
Data &H00 , &H41 , &H7F , &H41 , &H00 ,                     ' I
Data &H20 , &H40 , &H41 , &H3F , &H01 ,                     ' J
Data &H7F , &H08 , &H14 , &H22 , &H41 ,                     ' K
Data &H7F , &H40 , &H40 , &H40 , &H40 ,                     ' L
Data &H7F , &H02 , &H0C , &H02 , &H7F ,                     ' M
Data &H7F , &H04 , &H08 , &H10 , &H7F ,                     ' N
Data &H3E , &H41 , &H41 , &H41 , &H3E ,                     ' O
Data &H7F , &H09 , &H09 , &H09 , &H06 ,                     ' P
Data &H3E , &H41 , &H51 , &H21 , &H5E ,                     ' Q
Data &H7F , &H09 , &H19 , &H29 , &H46 ,                     ' R
Data &H46 , &H49 , &H49 , &H49 , &H31 ,                     ' S
Data &H01 , &H01 , &H7F , &H01 , &H01 ,                     ' T
Data &H3F , &H40 , &H40 , &H40 , &H3F ,                     ' U
Data &H1F , &H20 , &H40 , &H20 , &H1F ,                     ' V
Data &H3F , &H40 , &H38 , &H40 , &H3F ,                     ' W
Data &H63 , &H14 , &H08 , &H14 , &H63 ,                     ' X
Data &H07 , &H08 , &H70 , &H08 , &H07 ,                     ' Y
Data &H61 , &H51 , &H49 , &H45 , &H43 ,                     ' Z
Data &H00 , &H7F , &H41 , &H41 , &H00 ,                     ' [
Data &H55 , &H2A , &H55 , &H2A , &H55 ,                     ' 55
Data &H00 , &H41 , &H41 , &H7F , &H00 ,                     ' ]
Data &H04 , &H02 , &H01 , &H02 , &H04 ,                     ' ^
Data &H40 , &H40 , &H40 , &H40 , &H40 ,                     ' _
Data &H00 , &H01 , &H02 , &H04 , &H00 ,                     ' '
Data &H20 , &H54 , &H54 , &H54 , &H78 ,                     ' a
Data &H7F , &H48 , &H44 , &H44 , &H38 ,                     ' b
Data &H38 , &H44 , &H44 , &H44 , &H20 ,                     ' c
Data &H38 , &H44 , &H44 , &H48 , &H7F ,                     ' d
Data &H38 , &H54 , &H54 , &H54 , &H18 ,                     ' e
Data &H08 , &H7E , &H09 , &H01 , &H02 ,                     ' f
Data &H0C , &H52 , &H52 , &H52 , &H3E ,                     ' g
Data &H7F , &H08 , &H04 , &H04 , &H78 ,                     ' h
Data &H00 , &H44 , &H7D , &H40 , &H00 ,                     ' i
Data &H20 , &H40 , &H44 , &H3D , &H00 ,                     ' j
Data &H7F , &H10 , &H28 , &H44 , &H00 ,                     ' k
Data &H00 , &H41 , &H7F , &H40 , &H00 ,                     ' l
Data &H7C , &H04 , &H18 , &H04 , &H78 ,                     ' m
Data &H7C , &H08 , &H04 , &H04 , &H78 ,                     ' n
Data &H38 , &H44 , &H44 , &H44 , &H38 ,                     ' o
Data &H7C , &H14 , &H14 , &H14 , &H08 ,                     ' p
Data &H08 , &H14 , &H14 , &H18 , &H7C ,                     ' q
Data &H7C , &H08 , &H04 , &H04 , &H08 ,                     ' r
Data &H48 , &H54 , &H54 , &H54 , &H20 ,                     ' s
Data &H04 , &H3F , &H44 , &H40 , &H20 ,                     ' t
Data &H3C , &H40 , &H40 , &H20 , &H7C ,                     ' u
Data &H1C , &H20 , &H40 , &H20 , &H1C ,                     ' v
Data &H3C , &H40 , &H30 , &H40 , &H3C ,                     ' w
Data &H44 , &H28 , &H10 , &H28 , &H44 ,                     ' x
Data &H0C , &H50 , &H50 , &H50 , &H3C ,                     ' y
Data &H44 , &H64 , &H54 , &H4C , &H44



Egypt
:
Data 84 , 3,                                                ' Image Table Name, Xbytes, N of Lines, 254 bytes
Data &HFF , &H01 , &H01 , &H01 , &H01 , &H01 , &H01 , &H01 , &H01 , &H01 , &H01 , &H01 , &H01 , &H01 , &H01 , &H01,
Data &H01 , &H01 , &H01 , &H01 , &H01 , &H01 , &H01 , &H01 , &H01 , &H01 , &H81 , &H81 , &H81 , &H41 , &H41 , &H21,
Data &H21 , &H31 , &H11 , &H11 , &H11 , &H11 , &H11 , &H31 , &H21 , &HA1 , &H41 , &HC1 , &H81 , &H81 , &H01 , &H01,
Data &H01 , &H01 , &H01 , &H81 , &HC1 , &HE1 , &HF1 , &HF9 , &HFF , &HF3 , &H8D , &H11 , &H31 , &H41 , &H81 , &H81,
Data &HE1 , &HF1 , &HF9 , &HFD , &HFF , &HFF , &HFD , &H09 , &H11 , &H21 , &H41 , &H81 , &H01 , &H01 , &H01 , &H01,
Data &H01 , &H01 , &H01 , &HFF , &HFF , &H40 , &H40 , &H40 , &H40 , &H40 , &H40 , &H40 , &H40 , &H40 , &H40 , &H40,
Data &H40 , &H40 , &H40 , &H40 , &H40 , &H40 , &H40 , &H40 , &H60 , &H60 , &H3C , &H04 , &H06 , &H03 , &H01 , &H00,
Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H80 , &HE0 , &HE0 , &HF8 , &HFC , &HFE , &HFF , &HFF , &H82 , &H04,
Data &H08 , &H30 , &HE1 , &HE3 , &HF4 , &HFC , &HFE , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HF0,
Data &HFC , &HFC , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HFE , &HE0 , &H00 , &H00 , &H00,
Data &H01 , &H02 , &H04 , &H08 , &H10 , &H20 , &HC0 , &HFF , &HFF , &HFE , &HDE , &HFE , &HFE , &HFF , &HFE , &HFF,
Data &HFE , &HFF , &HEF , &HEF , &HDF , &HDF , &HFF , &HEF , &HFF , &HEF , &HEF , &HEF , &HEF , &H9E , &HDE , &HDE,
Data &HDE , &HDE , &HCE , &HCE , &HCE , &HEE , &HEE , &HCE , &H8E , &HCF , &HCF , &HCF , &HDF , &HEF , &HCF , &HEF,
Data &HCF , &HEF , &HDF , &HFC , &HFE , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF,
Data &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF , &HFF,
Data &HFF , &HFE , &HFC , &HFC , &HF8 , &HFC , &HFC , &HFF , &HFF , &HFF , &HFC , &HFF