Hi,
what's the exact problem ?
Just use the same 10h functions to output the text read from disk to screen than the one you use to print hardcoded string...
Main Topics
Browse All TopicsI have read literaly 50 tutorials on int 13h for disk i/o and int 10h for changing screen mode and even more on FAT12. I have tried to put it all together into one program and it just doesnt like me. This is for an operating system I am trying ot build from scratch. So far I have been able to:
-reset the drive
-read to a buffer (! have slight prroblem accessing the data once it is in the buffer)
-print a hard coded string of test.
-change video modes
What I want to be able to do is have my program
read from the disk.
store it in a buffer.
output the buffer to the screen.
hang, die, crash, w/e
at the moment I am not looking for this to be bootable. I do not want to use DOS interupts because they just wont work when I go to make it bootable.
(i have tasm and nasm)
I would appreciate any help.
thanks in advance,
-Ken
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I haven't written asm for a while now, and i lost near all my code, but...
Ok, for storing into buffer, this should just be done by the reading, nope ? Int13 MUST write the information in a buffer when reading it from disk...
For the move to memory, you have to know the beginning of the video memory in the video mode you set, and then do the copy from your buffer to this area (rep movsb (or movsw or movsd)).
I don't remember exactly but the number of times to repeat should be stored in cx if i remember well, and the copy is done from ds:si to es:di.
Be careful to be in a pure text mode, else you'll just have a few garbage points on your screen, not the text stored in your buffer. Just try this without swapping video mode.
Thanks for the help. I know that INT 13h stores it in a Buffer but Im not sure how to declare the buffer or where to put it. As for the video mode thing I have no clue how to find the video address. Im running an AMD XP 2600 made by HP running XP home. Dunno if that will help determine it.
Thanks for your help so far, more help would be appreciated.
Thanks,
Ken
Hello,
to declare the buffer, use something like
buffer: resb 512 ; reserver 512 bytes
You have then to make the int 13h reading function write to this address.
For the video, in text mode, the vga memory is at 0xb800 (16 bits adress).
I must warn you on a thing : writing raw data to video memory in text mode will result in a big mess on your screen !
The video memory does not contain ONLY text. It contains also attributes (color, blink, ...).
Each character is immediatly followed by its attributes.
Just have a look to the chapter "The Video Memory Principles" on this page : http://www.xs4all.nl/~smit
It explains that.
So, you will have to modify the data read before displaying it, or add the attributes in your data when creating them on the disk...
Good luck.
Thanks for the help, I know about the attributes byte in AL when writing to video memory.
What I would really appreciate is a piece of working code for TASM or NASM plz. Just a small one that writes to video memory.
ex.
prints A on screen from buffer BUFFER
result:
c:\prog.exe
A
c:\_
or something like that. I dont care where on the screen A is or if the Dos prompt shows up or if it hangs or whatever.
Thanks again all.
Business Accounts
Answer for Membership
by: RexNgPosted on 2003-01-20 at 17:24:01ID: 7765949
I have the same experience before, it sounds u gonna make your OS. Spend some time on Pentium manual and FDC manuals; don't expect someone gonna help u ( including me).