Page 1 of 1
PMTUTS from AlexFru now 01, 02, 03 in Borland Pascal 7 with
Posted: Thu Mar 25, 2004 12:00 am
by RodrigoFagner
I´m trying to write all 17 tutorials from AlexFru to Borland Pascal 7 with Tasm
I have do 01 and 02 I´m writing know 03
01 and 02 it´s working fine
it´s almost like C and Nasm but it is in Borland Pascal and TASM
if somebody else is interesting to have a look at please email-me
[email protected] I´m Brazilian but I´m a Good guy!
just kidding
bye!
RE:PMTUTS from AlexFru now 01, 02, 03 in Borland Pascal 7 wi
Posted: Fri Mar 26, 2004 12:00 am
by ASHLEY4
Hi
I made a turbo pascal OS(real mode), About 3 years a go.
The thing that i did not understand was if you use WRITE or WRITELN in your OS it crashed (as it most have used a dos function) But if you use WRITE or WRITELN and put "use crt;" then they work fine ???,
Y i do not no,there is nothing in the doc about it.
PS. Would you not be better off useing freepascal, Its it run in pmode and is 100% compitable with TP ?
ASHLEY4.
RE:PMTUTS from AlexFru now 01, 02, 03 in Borland Pascal 7 wi
Posted: Fri Mar 26, 2004 12:00 am
by rodrigofagner
write and writeln does't work fine on pm mode without a vm86 mode...
you have to set up a vm86 set up all IDT ...
I'am right now on pmtut 03 of 17 AlexeiFru!!!
I'am almost there...
but I'am not a C programmer I cannot uset cuz I use pascal since a 1995
I'am trying to learn that but ...
RE:PMTUTS from AlexFru now 01, 02, 03 in Borland Pascal 7 wi
Posted: Fri Mar 26, 2004 12:00 am
by ASHLEY4
No you mis understand my point,i was in REAL MODE!.
"Write" (in turbo pascal) should have worked or notworked (in my kernel) ,it should not have made a diffrunc if i used " use crt ; " ,this should not have any thing to do with "write" function.
ASHLEY4.
RE:PMTUTS from AlexFru now 01, 02, 03 in Borland Pascal 7 wi
Posted: Fri Mar 26, 2004 12:00 am
by rodrigofagner
oww you right, I'm sorry ASHLEY4! really sorry! I wrote a fastwrite function to do that! could you help in other thing! __emit__ (0xCD, 0x20) it's a like insline right ? please ! 0xCD what is does? mov ax ? int ?
please help me!
RE:PMTUTS from AlexFru now 01, 02, 03 in Borland Pascal 7 wi
Posted: Fri Mar 26, 2004 12:00 am
by carbonBased
I would imagine that works because the 'use crt' directive tells TP to link with a console library that uses direct CRT access, rather then DOS interrupts.
Can't confirm -- 'cuz on the surface, that would imply two separate console libraries, with duplicate naming. It'd have to special case this directive to remove the "default" console library, otherwise there'd be duplicate symbols.
But... that's the only explanation I have for it.
Cheers,
Jeff
RE:PMTUTS from AlexFru now 01, 02, 03 in Borland Pascal 7 wi
Posted: Fri Mar 26, 2004 12:00 am
by ASHLEY4
I think your right, but Y they did this i do not no, It does not matter it was a long time ago, But the madning thing was that i rewrote the functions for "write, writeln, etc" and then found you could do this.
ASHLEY4.
RE:PMTUTS from AlexFru now 01, 02, 03 in Borland Pascal 7 wi
Posted: Sat Mar 27, 2004 12:00 am
by hartyl
CD 20 --> int 0x20
the __emit__-thing is putting some bytes right into the code; it's like inline-assembly with byte-code.
greets, hartyl
RE:PMTUTS from AlexFru now 01, 02, 03 in Borland Pascal 7 wi
Posted: Sat Mar 27, 2004 12:00 am
by RodrigoFagner
many thank´s greets, hartyl it´s already working....
RE:PMTUTS from AlexFru now 01, 02, 03 in Borland Pascal 7 wi
Posted: Sat Mar 27, 2004 12:00 am
by ASHLEY4
Just another 14 to go
ASHLEY4.
RodrigoFagner to ASHLEY4.
Posted: Sun Mar 28, 2004 12:00 am
by RodrigoFagner
ASHLEY4. the PMTUTS 03 it´s already working!
they workin fine... when fill up GDT and IDT(0) and (20h)
in the code I did asm int 20h then wrote welcome do PM with ISR!
and when I wrote on the code like
number1 := 1;
number2 := 0
number3 := number1 div 0;
then it show on the screen GPF fault!
ASHLEY4. I´m so happy! I can´t believe I´m doing that!!!
you know a thing! I don´t understand why I use
procedure xxx;
begin
end;
then computer crash ! I think that this way it change the DS or ES or SS registers that way I think the computer crash!!! ? ? ?
procedure xxx;assembler
asm
...
end; the computer working fine ? do you know why ASHLEY4.? please help me
RE:RodrigoFagner to ASHLEY4.
Posted: Sun Mar 28, 2004 12:00 am
by ASHLEY4
SORRY! i do not no,its 3 year since i used pascal,the thing is that you will end up doing, it in inline assembly.which means you mays well do it in asm in the first place.
Congratulations on geting so far you have done well !.
How you are geting into pmode with a 16bit turbo pascal, i do not know?
Are you useing BP ?
This is a good link for code:
http://www.bsdg.org/swag/
ASHLEY4.