Forum unknown
· Programming
#Modula-2
17 messages in this thread
I thought that if use the OPEN (from DOSFiles I believe) then you can write to
the window as though you were writing to a file. I'll have to check into this
though……Richie
According to the the manuals you can EITHER access the window from AmigaDOS or
through Intuition. The first is only as simple as the demo you mentioned. The
other entails using a message port. I'm getting closer to getting it right but
I still get a resounding CRASH! I know I'm making a silly mistake somewhere but
I don't know where yet. The Narrator device demo is leading in the right
direction. I've managed to open the console.device so far but that's about it.
Maybe I'll send up the code I've already written and let you have a look-see.
Thanks for any help. There aren't too many of us around (yet!). Later…..
Ervin, I have been trying to do IO with the ROM kernal examples using IOStd
Requests, Ports, etc. I am getting it to work, but when i run the thing three
times in a row, the third one gets me a beautiful crash. The screen freezes
and lines start growing from the bottom of the screen to the top. Then I get
a Guru message and by-by. I want to use the ROM method becau se I want to get
a character without having to hit return. If you figure it out, I'll be
watching for a bragging message from you. To clarify the poorly written
sentence above. My example Modula-2 program works fine twice, the third
time…
Why are you using IOStdReq instead of IDCMP? I find IDCMP more reliable the
IOStdReq, i.e. I can get my programs to work with IDCMP, but experience the
same problems you mention with IO…
It seems to me that using IOStdReq is absolutely necessary at times if you
want to do some "heavy-duty" IO. I haven't had the time or the inclination to
screw around with it lately. I'm too much of a rookie to lay any blame but
I'm beginning to wonder if it's a problem in the TDI modules.
Speaking of TDI: Is the May bug-fix gonna make it out by August? This is a
Real Soon Now award winner for sure. I'm hoping it has some features like a
Trapper module that works outside of the DOS programming enviornment. By the
way I occasionally get a Heap Overflow error and the only cure is to pull out
the code and compile it as a seperate module. I don't want to create too many
custom modules do to the fact I'd hate to see Modula become that
un-standardized. Does anyone know what gives with this one.
It seems to me that using IOStdReq is absolutely necessary at times if you
want to do some "heavy-duty" IO. I haven't had the time or the inclination to
screw around with it lately. I'm too much of a rookie to lay any blame but
I'm beginning to wonder if it's a problem in the TDI modules.
Speaking of TDI: Is the May bug-fix gonna make it out by August? This is a
Real Soon Now award winner for sure. I'm hoping it has some features like a
Trapper module that works outside of the DOS programming enviornment. By the
way I occasionally get a Heap Overflow error and the only cure is to pull out
the code and compile it as a seperate module. I don't want to create too many
custom modules do to the fact I'd hate to see Modula become that
un-standardized. Does anyone know what gives with this one.
I am 'trying' to use IOStdReq, etc. because I wanted to do both graphics and
Text IO in a window that I created. The Intuition manual seemed to state that
opening a Console would give me the ability to do Text IO, but left me no
Window Pointer to do graphics on the same window. Also, the DOS IO function's
do not support single character gets. In other words, If I want to set up a
one byte field for input, I have to rely on the user to only enter one byte,
and then to hit ENTER to receive it. This is irritating to me. I want to get
the byte and skip to the next field without having to hit ENTER. You can do
this with IOStd type stuff in C, but I am having a heck of a time getting it
to work in Modula-2. If the IDCMPF method overcomes the 2 problems I have
mentioned above, please let me know, and I will give it a try. I appreciate
your interest, there a plenty of wonderful graphic examples out there, but
the Amiga should be able to do good oldfashioned text programs too.
IDCMP I/O to/from a window IS byte based, that is you get a message from
Intuition every time the user hits a key (assuming you set the RAWKEY or
VANILLAKEY flag when opening the window). Graphics and Text are managed via
the EXEC calls. OOOOPS Graphics is via Exec, text is via IntuiText. I'll
write a quick program showing the use of IDCMP in Modula-2. BTW I use TDI
modula, is trhat acceptable?
I am going to get out my INTUITION manual and study the IO section again.
RAWKEY was very frightening to a non-developer like myself. The idea that i
would have to decode both the down and up key strokes to get a character
brought visions of hundreds of lines of code just to read a byte. Maybe it
isn't so bad.
I appreciate your reply. The ROM Kernal examples just won't work. I have
eliminated the dynamic allocation of IOStdReq via CreateStdIO and replaced it
with the variables being physically allocated in the program, but I still
lose 48 bytes after an execution, and the system goes down on the next run.
If you get an example somewhere, I will be ecstatically pleased to look at
it. I cannot justify Modula-2 if I can't do single character gets without
hitting RETURN. But Modula-2 is so easy to work with otherwise. I may have to
investigate TRUEBASIC if I don't resolve this one.
Sorry for not sending you an example, been EXTREMELY busy lately. You don't
have to interpret the Upstroke – just toss it in the garbage. Also look into
VANILLAKEY (sorta undocumented). Makes things a bit easier.
Sorry for not sending you an example, been EXTREMELY busy lately. You don't
have to interpret the Upstroke – just toss it in the garbage. Also look into
VANILLAKEY (sorta undocumented). Makes things a bit easier.
I am going to get out my INTUITION manual and study the IO section again.
RAWKEY was very frightening to a non-developer like myself. The idea that i
would have to decode both the down and up key strokes to get a character
brought visions of hundreds of lines of code just to read a byte. Maybe it
isn't so bad.
I appreciate your reply. The ROM Kernal examples just won't work. I have
eliminated the dynamic allocation of IOStdReq via CreateStdIO and replaced it
with the variables being physically allocated in the program, but I still
lose 48 bytes after an execution, and the system goes down on the next run.
If you get an example somewhere, I will be ecstatically pleased to look at
it. I cannot justify Modula-2 if I can't do single character gets without
hitting RETURN. But Modula-2 is so easy to work with otherwise. I may have to
investigate TRUEBASIC if I don't resolve this one.
IDCMP I/O to/from a window IS byte based, that is you get a message from
Intuition every time the user hits a key (assuming you set the RAWKEY or
VANILLAKEY flag when opening the window). Graphics and Text are managed via
the EXEC calls. OOOOPS Graphics is via Exec, text is via IntuiText. I'll
write a quick program showing the use of IDCMP in Modula-2. BTW I use TDI
modula, is trhat acceptable?
I am 'trying' to use IOStdReq, etc. because I wanted to do both graphics and
Text IO in a window that I created. The Intuition manual seemed to state that
opening a Console would give me the ability to do Text IO, but left me no
Window Pointer to do graphics on the same window. Also, the DOS IO function's
do not support single character gets. In other words, If I want to set up a
one byte field for input, I have to rely on the user to only enter one byte,
and then to hit ENTER to receive it. This is irritating to me. I want to get
the byte and skip to the next field without having to hit ENTER. You can do
this with IOStd type stuff in C, but I am having a heck of a time getting it
to work in Modula-2. If the IDCMPF method overcomes the 2 problems I have
mentioned above, please let me know, and I will give it a try. I appreciate
your interest, there a plenty of wonderful graphic examples out there, but
the Amiga should be able to do good oldfashioned text programs too.
Why are you using IOStdReq instead of IDCMP? I find IDCMP more reliable the
IOStdReq, i.e. I can get my programs to work with IDCMP, but experience the
same problems you mention with IO…
Ervin, I have been trying to do IO with the ROM kernal examples using IOStd
Requests, Ports, etc. I am getting it to work, but when i run the thing three
times in a row, the third one gets me a beautiful crash. The screen freezes
and lines start growing from the bottom of the screen to the top. Then I get
a Guru message and by-by. I want to use the ROM method becau se I want to get
a character without having to hit return. If you figure it out, I'll be
watching for a bragging message from you. To clarify the poorly written
sentence above. My example Modula-2 program works fine twice, the third
time…
According to the the manuals you can EITHER access the window from AmigaDOS or
through Intuition. The first is only as simple as the demo you mentioned. The
other entails using a message port. I'm getting closer to getting it right but
I still get a resounding CRASH! I know I'm making a silly mistake somewhere but
I don't know where yet. The Narrator device demo is leading in the right
direction. I've managed to open the console.device so far but that's about it.
Maybe I'll send up the code I've already written and let you have a look-see.
Thanks for any help. There aren't too many of us around (yet!). Later…..