1. Bios
Greetings!
I'm a beginner in Euphoria. I am also blind, and the first thing that I
noticed with Euphoria programs is they don't talk. The reason is that the
text is written directly to the screen and not through bios. My
screenreading package picks up text sent through bios to the screen and
speaks it, otherwise I need to review the screen by hand which becomes
annoying after a while. Is there a way to make Euphoria programs use Bios
when writing to the screen? If I could get some help, that'd be great.
I'd like to be able to write programs that my blind friends can access
and easily as the sighted community.
Regards
Ben.
2. Re: Bios
Hi Ben
Your listserv post is not only proof of your courage to overcome such a
difficult challenge, it is a humble reminder of the shortage of software
out there for the visually challenged.
As far as I know, the only way Euphoria can access BIOS is by low level
programming. I am not sure if peek() and poke() invoke BIOS screen calls.
I invite others more qualified to help expand on my post.
Take care
David
3. Bios
I am not sure but I believe this is Jacques area.
To send text through Bios is an interrupt call.
More specifically interrupt #10. I don't know which
function of the interrupt.
A function will have to be written to use this Bios
interrupt. Then the programs written would have
to use that function instead of puts() or printf().
--Lucius Lamar Hilley III
-- E-mail at luciuslhilleyiii at juno.com
-- I support transferring of files less than 60K.
-- I can Decode both UU and Base64 format.
4. Re: Bios
i was under the impression that when you used euphoria's standard
procedures to write text to the screen, it did it through the
bios...that's why i made my own procedures to write text directly to
the screen (it's faster)... so anyway i guess you'll have to use
inline assembly to make a new procedure (or to take out an exisiting
one)... here's a really BAD example of how to do it (it you want a
better way, wait for jacques dechenes to come on):
------------ start code -------------
include machine.e
procedure write_text(object string,integer page_number)
atom address
sequence code
if atom(string) then
string = {string}
end if
code = {
#50,
#53,
#51,
#B4,#0A,
#B7,page_number,
#B9,#01,#00
}
for i = 1 to length(string) do
code = code & {#B3,string[i]}
end for
code = code & {#C3}
a = allocate(length(code))
poke(a,code)
call(address)
free(address)
end procedure
------------------ end code ----------
this requires that you plug in which video page you're on at the time
and all that so it might get very annoying to use... also it might
not work at all because i haven't tried yet... ahhaha... anyway i
don't know bios codes very well and how to use them, etc. you're
better off waiting until someone who knows what they're talking about
answers your question (i.e. jacques deschenes)
. o O Mike Burrell O o .
. o O http://www.geocities.com/SoHo/9036 O o .
. o O burrellm at geocities.com O o .
5. Re: Bios
- Posted by Marcel Kollenaar <M.Kollenaar at SLO.NL>
May 03, 1997
-
Last edited May 04, 1997
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
6. Bios
Ben Van Poppel writes:
> I'm a beginner in Euphoria. I am also blind, and the first thing that I=
> noticed with Euphoria programs is they don't talk. The reason is that t=
he
> text is written directly to the screen and not through bios. =
That's strange. Euphoria calls a WATCOM C routine to perform all
text output to the screen. That routine is documented as using the
system BIOS. Calls to Euphoria's puts() and printf(), when directed
to the screen, use this C routine. The standard Euphoria editor, ed, =
calls puts(). It never pokes values directly to screen memory.
A tiny percentage of Euphoria programs call display_text_image() in image=
=2Ee. =
It *does* poke values directly to screen memory. David Cuny's
editor uses pokes and calls to display_text_image(). It would
therefore give you problems.
Euphoria runs in 32-bit protected mode, and switches to 16-bit mode
to do system calls, such as text output. I wonder if this =
DOS-extended nature of Euphoria could somehow be upsetting =
your screen-reading software.
Regards,
Rob Craig
Rapid Deployment Software
=
7. Re: Bios
At 14:08 97-05-03 +1000, you wrote:
>I'm a beginner in Euphoria. I am also blind, and the first thing that I
>noticed with Euphoria programs is they don't talk. The reason is that the
>text is written directly to the screen and not through bios. My
>screenreading package picks up text sent through bios to the screen and
>speaks it, otherwise I need to review the screen by hand which becomes
>annoying after a while.
Hi Ben,
As Robert wrote euphoria call bios function to write to screen so your
screenreading package should work.
Could send me more information about your hardware and software configuration.
Type of audio card used.
operation system used (dos, windows 3.xx or windows 95)
Jacques Deschenes
Baie-Comeau, Quebec
Canada
desja at quebectel.com