Re: Bios
Hello Ben,
Welcome to the Euphoria community:
Oke, Ben. I wrote a little programm that prints letters like a
teletype on the screen. It is done with interrupt 10h and function
0Eh.
Bell, carriage return and line feed are recognized. Words are wrapped
and written to the next line and eventually scrolled up at the
bottom of the screen.
The code is not very professionel and I ask my fellow programmers to
help me and to correct especially the hex arithmetic in the functions.
Here is comes:
--code
include machine.e
function video_mode()
sequence reg_list
reg_list = repeat(0,10)
reg_list[REG_AX] = #0F00
reg_list = dos_interrupt(#10,reg_list)
return reg_list[REG_BX]
end function
procedure t3_screen(integer char, integer video_page)
-- Uses DOS INT #10, service #0E to write to the screen in teletype
mode.
sequence reg_list
reg_list = repeat(0,10)
reg_list[REG_AX] = #0E00+char
reg_list[REG_BX] = #0000+(video_page*256)
reg_list = dos_interrupt(#10,reg_list)
end procedure
integer video_page
sequence s
video_page = video_mode()
--printf(1,"%x",video_mode())
s = "This is a test."
for i = 1 to length(s) do
t3_screen(s[i],video_page)
end for
--code ends
Regards,
Marcel Kollenaar
The Netherlands
|
Not Categorized, Please Help
|
|