private Sub LoadImageFile (fileName As String)
Dim Buffer (504) As Byte
If Sd.OpenRead(fileName) Then
Sd.Stream .ReadBytes(Buffer,0,503)
Sd.OpenRead("") 'some dirty dots appear at the end, that's the only way worked to removed them
Sd.Close
WriteByte(0x80, 0)
WriteByte(0x40, 0)
WriteByte(0x80, 0)
Dim testbyte As Byte
For i=0 To 503
testbyte = Buffer(i)
WriteByte(testbyte, 1)
Next
End If
End Sub