How to read data from CD-ROM using in & out ???

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
BOTOKILLER
Member
Member
Posts: 28
Joined: Tue Jan 04, 2011 10:25 am
Location: Ukraine

How to read data from CD-ROM using in & out ???

Post by BOTOKILLER »

I found how to make ISO in FASM on FASM forum, now i need to read data from it without using Bios int 13h
please help me with that)
PS: dont tell me about OSDEVwiki google, i've already searched there (maybe im not good at it enough)
PPS: i found how to make ISO in fasm, but i dont understand follwing things
- is the size of segment 2048 byte?
- is the bootsector 2048 bytes too?
- there is mark that at the end to place all remaining code, is it going to be sector number 2
- do i have to correct the size of boot.asm to the size of a segment?(like put nop into free space)
if you're not too buzy please look at this code and answer my question))
| | |
| | |
| | |
\/ \/ \/
Attachments
ISO.ASM
this is iso code on fasm .....
it works on emulator(i already tested) but i dont understand some parts of it
(5.14 KiB) Downloaded 154 times
quok
Member
Member
Posts: 490
Joined: Wed Oct 18, 2006 10:43 pm
Location: Kansas City, KS, USA

Re: How to read data from CD-ROM using in & out ???

Post by quok »

Sounds like you need to read the ISO9660 and El Torito specs. Guess what; they're both linked from the wiki. The wiki ISO_9660 page should help get you started.

I would recommend just using the BIOS functions to write your bootloader, as they're perfectly capable of reading data from a CD. Otherwise, you'll at the very least need to write an ATAPI driver.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: How to read data from CD-ROM using in & out ???

Post by Combuster »

You still seem clueless.

- There are wiki articles on reading CDs, booting from CDs and everything. even regular wikipedia can answer the simpler questions. Learn to search - quok mentioned the keywords - you really need that skill.
- You mention some ugly hack you copied from somewhere and probably found so 1337 that you just had to use it. In the meantime you neglect to tell us the most important thing: what is your goal (as demanded by the smart questions rule)
- I'm missing the design part of your question, so it must be the wrong forum.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
BOTOKILLER
Member
Member
Posts: 28
Joined: Tue Jan 04, 2011 10:25 am
Location: Ukraine

Re: How to read data from CD-ROM using in & out ???

Post by BOTOKILLER »

Combuster wrote: - I'm missing the design part of your question, so it must be the wrong forum.
Errr.... Actually it's OS Design and THEORY
quok wrote:ounds like you need to read the ISO9660 and El Torito specs. Guess what; they're both linked from the wiki. The wiki ISO_9660 page should help get you started.

I would recommend just using the BIOS functions to write your bootloader, as they're perfectly capable of reading data from a CD. Otherwise, you'll at the very least need to write an ATAPI driver.
thanks) but what if i need to do it in protected mode?
Tosi
Member
Member
Posts: 255
Joined: Tue Jun 15, 2010 9:27 am
Location: Flyover State, United States
Contact:

Re: How to read data from CD-ROM using in & out ???

Post by Tosi »

OS design and theory is supposed to be more abstract and not related to a single CPU family or computer architecture. It covers things such as task scheduling, I/O scheduling, IPC, and memory management, which all modern kernels should have regardless of what they're running on. CD-ROM filesystems are not OS design and theory.

As for reading a CD in protected mode, if you can do it in real mode without the BIOS you can do it in protected mode. Write a driver for the CD drive, and then implement a ISO9660 or El Torito filesystem driver on top of that.
Post Reply