Enumeration 
  #WindowOptionAccesMemoireVideo
  
  #WindowOptionAccesMemoireVideoTextEditor
EndEnumeration



If OpenWindow(#WindowOptionAccesMemoireVideo, 0, 0, 800, 500, "Mémoire Vidéo", #PB_Window_Tool|#PB_Window_TitleBar|#PB_Window_ScreenCentered|#PB_Window_SystemMenu|#PB_Window_SizeGadget)
  
  EditorGadget(#WindowOptionAccesMemoireVideoTextEditor, 3, 3, 1020-6, 550-6 , #PB_Editor_ReadOnly)
;     Font1 = LoadFont(#PB_Any, "Courier",  8)
;     SetGadgetFont(#WindowOptionMemoireVideoTextEditor, FontID(Font1)) 
    
    mem=753664 ; $B8000
       
    k=0
    For page=0 To 3 ; 4 pages
      Texte$="   "
      AddGadgetItem(#WindowOptionMemoireVideoTextEditor, -1, "")
      AddGadgetItem(#WindowOptionMemoireVideoTextEditor, -1, "")
      AddGadgetItem(#WindowOptionMemoireVideoTextEditor, -1, "Page " + Str(page))
        
      ;ligne 1 n° de colonne
      For i=0 To 79
        Texte$ + RSet(Str(i), 5, "0") + " "
      Next i
      AddGadgetItem(#WindowOptionMemoireVideoTextEditor, -1, Texte$)
            
      Texte$=""
      For j=0 To 24
        Texte$=RSet(Str(j), 2, "0") + " "
        For i=0 To 79
          Texte$ + Hex(mem+k, #PB_Long) + " " 
          k + 2 
        Next i
        AddGadgetItem(#WindowOptionMemoireVideoTextEditor, -1, Texte$)
        Texte$=""
      Next j
           
    Next page

  EndIf 
  EndProcedure


mem=Val("$B8370")
;Debug mem
chaine.s="Noyau Chargé."
Ligne1.s=""
Ligne2.s=""

For i = 0 To Len(chaine)-1 
  c$=Mid(chaine,i+1,1)
  ;l1=
  ligne1 + "mov byte [0x" + Hex(mem+2*i, #PB_Long) + "], '" + c$ + "'" 
  ligne2 = "mov byte [0x" + Hex(mem+2*i+1, #PB_Long) + "], 0xE2"
  Debug ligne1
  Debug Ligne2
  ligne1=""
  
Next i

; 
; mov byte [0xB8280], 'H'
; mov byte [0xB8281], 0xE2


; IDE Options = PureBasic 4.61 (Windows - x86)
; CursorPosition = 10
; EnableXP
; CompileSourceDirectory