writex dd 0
writey dd 0
clearbkchar db 97
textscreenoffset DD 0
curtx DD 0
curty DD 0
curtoffset DD 0
textdchandle DD 0
fixedsys DB 'fixedsys', 0

Windowhandle DD 0
Textwinclassname DB 'ubasictextwinclass', 0
Textwinname DB 'Ubasic Program Output', 0
TextFont DD 0

rectstruct:
istruc RECT
    at RECT.left,   dd 0
    at RECT.top,    dd 0
    at RECT.right,  dd 640
    at RECT.bottom, dd 400
iend

Textwindowclass:
istruc WNDCLASSEX
    at WNDCLASSEX.cbSize,          dd  WNDCLASSEX_size
    at WNDCLASSEX.style,           dd  CS_VREDRAW | CS_HREDRAW
    at WNDCLASSEX.lpfnWndProc,     dd  textwinproc
    at WNDCLASSEX.cbClsExtra,      dd  0
    at WNDCLASSEX.cbWndExtra,      dd  0
    at WNDCLASSEX.hInstance,       dd  0
    at WNDCLASSEX.hIcon,           dd  0
    at WNDCLASSEX.hCursor,         dd  0
    at WNDCLASSEX.hbrBackground,   dd  COLOR_WINDOW
    at WNDCLASSEX.lpszMenuName,    dd  0
    at WNDCLASSEX.lpszClassName,   dd  Textwinclassname
    at WNDCLASSEX.hIconSm,         dd  0
iend

textPaintStruct:
istruc PAINTSTRUCT
    at PAINTSTRUCT.hdc,         RESD 1
    at PAINTSTRUCT.fErase,      RESD 1
    at PAINTSTRUCT.rcPaint,     RESB RECT_size
    at PAINTSTRUCT.fRestore,    RESD 1
    at PAINTSTRUCT.fIncUpdate,  RESD 1
    at PAINTSTRUCT.rgbReserved, RESB 32 
iend

MSGstruct DD 0,0,0,0,0,0,0

dosscreencolors:
col0 db 0, 0, 0, 0
col1 db 0, 0, 128, 0
col2 db 0, 128, 0, 0
col3 db 0, 128, 128, 0
col4 db 128, 0, 0, 0
col5 db 128, 0, 128, 0
col6 db 128, 64, 0, 0
col7 db 192, 192, 192, 0 
col8 db 128, 128, 128, 0
col9 db 0, 0, 255, 0
col10 db 0, 255, 0, 0
col11 db 0, 255, 255, 0
col12 db 255, 0, 0, 0
col13 db 255, 0, 255, 0
col14 db 255, 255, 0, 0
col15 db 255, 255, 255, 0