flat assembler
Message board for the users of flat assembler.

Index > Main > io without 21h

Author
Thread Post new topic Reply to topic
Llama Boy



Joined: 24 Jul 2005
Posts: 7
Location: Texas, USA
Llama Boy 26 Jul 2005, 06:11
ok, i know the input and output using 21h, but i dont want it to rely on dos. can i see the code for platform independant INT 21h (ah=9) and INT 21h (ah=0Ah).
Thanks

_________________
Image
donut < llama < az
http://llama.computerboffin.com/ <-signup
http://llama.computerboffin.com/dotvs/
Post 26 Jul 2005, 06:11
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20421
Location: In your JS exploiting you and your system
revolution 26 Jul 2005, 06:47
There is no platform independent code for outputting text and inputting keystrokes. You can use the bios INT's 10 etc. but they only work in a real mode OS. Protected mode OS's each have their own style of doing IO and you have no choice but to learn for each OS you want to use.

For Linux - INT 80h
For Windows - API's
For DOS - INT 21h
For BIOS - INT 16h and INT 10h
Post 26 Jul 2005, 06:47
View user's profile Send private message Visit poster's website Reply with quote
Llama Boy



Joined: 24 Jul 2005
Posts: 7
Location: Texas, USA
Llama Boy 26 Jul 2005, 06:52
well thanks. also, why are most major OSs protected mode?
Post 26 Jul 2005, 06:52
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20421
Location: In your JS exploiting you and your system
revolution 26 Jul 2005, 07:15
Quote:
why are most major OSs protected mode?
Multi-tasking, multi-user, more effective use of the CPU resources.

Have a look at the FASM sources, each supported platform has it's own directory and files to allow the basic IO for use by the core.
Post 26 Jul 2005, 07:15
View user's profile Send private message Visit poster's website Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 26 Jul 2005, 08:42
Llama boy: protected mode allows access to MUCH more memory, better protection of memory resources, and on new processors, allows you to use hyperthreading for faster process multi-tasking, plus the stuff mentioned above
Post 26 Jul 2005, 08:42
View user's profile Send private message Reply with quote
shaolin007



Joined: 03 Sep 2004
Posts: 65
shaolin007 26 Jul 2005, 12:48
revolution wrote:
There is no platform independent code for outputting text and inputting keystrokes. You can use the bios INT's 10 etc. but they only work in a real mode OS. Protected mode OS's each have their own style of doing IO and you have no choice but to learn for each OS you want to use.

For Linux - INT 80h
For Windows - API's
For DOS - INT 21h
For BIOS - INT 16h and INT 10h


You could, in real mode that is, write directly to video memory or handle the output by hooking int 09. But why reinvent the wheel unless you have to?
Post 26 Jul 2005, 12:48
View user's profile Send private message Reply with quote
Llama Boy



Joined: 24 Jul 2005
Posts: 7
Location: Texas, USA
Llama Boy 27 Jul 2005, 04:48
im guessing protected mode os is much harder to write, seeing as how it gets all these awesome features.
Post 27 Jul 2005, 04:48
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
smiddy



Joined: 31 Oct 2004
Posts: 557
smiddy 27 Jul 2005, 11:41
Llama Boy wrote:
im guessing protected mode os is much harder to write, seeing as how it gets all these awesome features.


Nah, it isn't harder. It is more time consuming since there are more opportunities for performance and features. Laughing
Post 27 Jul 2005, 11:41
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.