![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
King of Portal
|
The menuetOS code doesn't set those up, all the Bochs emulator has is its own emulated BIOS code of which apparently one of them is the interrupt vector 10h. The menuetOS isn't an OS that I'm loading on the system. I'm EXCLUSIVELY using the menuetOS code that is listed here (the TOTAL code actually loaded the OS, I just stripped it down to display a string) and from what I can tell in the code it's not redefining any interrupts and it also makes use of 10h. The major difference is that the menuetOS code segment works. I cannot say more about the emulated BIOS that Bochs is currently using because I don't know enough about it. All I know is that these two code segments when executed individually under the same procedure and environment. One works and one doesn't. Therefore, the answer lies somewhere in the code that I have posted here. I'm hoping that someone can point out what that key difference is.
__________________
Lo, there do I see my father. 'Lo, there do I see My mother, and my sisters, and my brothers. 'Lo, there do I see The line of my people... Back to the beginning. 'Lo, they do call to me. They bid me take my place among them. In the halls of Valhalla... Where the brave... May live... ...forever.. GrimBB | Mimesis |
|
|
|
|
|
#12 |
|
King of Portal
|
Never mind I believe I've discovered the problem and it was in my own code, apparently I need to make a series of declarations regarding the sectors per cluster and other such things immediately after the jmp and nop since apparently these are required by BIOS or DOS or something or other. To see what I mean look here http://www.exegesis.uklinux.net/gand...t/disk.htm#7.3 that information is included in the MenuetOS code which works (I neglected to post it here thinking it was superfluous data).
__________________
Lo, there do I see my father. 'Lo, there do I see My mother, and my sisters, and my brothers. 'Lo, there do I see The line of my people... Back to the beginning. 'Lo, they do call to me. They bid me take my place among them. In the halls of Valhalla... Where the brave... May live... ...forever.. GrimBB | Mimesis |
|
|
|
|
|
#13 |
|
Programmer
|
That's only if you're interested in writing anything to do with FAT-formatted disks.
|
|
|
|
|
|
#14 |
|
King of Portal
|
Yes the majority of that deals with writing to a FAT filesystem. However, it shows the general structure of the boot sector before any file operations. The code for the menuetOS that I posted previously for instance, won't load. However this code:
boot_program equ 07c00h ;position for boot code jmp start_program nop oemname db 'MENUETOS' bytespersector dw 512 sectorspercluster db 1 ressectors dw 1 numcopiesfat db 2 maxallocrootdir dw 224 maxsectors dw 2880 ;for 1.44 mbytes disk mediadescriptor db 0f0h ;fd = 2 sides 18 sectors sectorsperfat dw 9 sectorspertrack dw 18 heads dw 2 hiddensectors dd 0 hugesectors dd 0 ;if sectors > 65536 drivenumber db 0 db 0 bootsignature db 029h ;extended boot signature volumeid dd 0 volumelabel db 'MENUET DISK' filesystemtype db 'FAT12 ' start_program: xor ax,ax mov ss,ax mov sp,boot_program push ss pop ds mov si,loading+boot_program loop_loading: lodsb or al,al jz procura_arquivo_novamente mov ah,0eh mov bx,07h int 010h jmp loop_loading procura_arquivo_novamente: push ss pop es mov bp,16 newtry: dec bp loop_envio_mensagem: lodsb or al,al jz espera_digitar_tecla mov ah,0eh mov bx,07h int 010h jmp loop_envio_mensagem espera_digitar_tecla: jmp $ loading db 13,10,'Starting MenuetOS ',00h times 0x1fe-$ db 00h db 55h,0aah ;boot signature Assembly Language Jump to Boot Code Disk Parameters Needed by DOS Assembly Language Boot Code Error Messages System File Names DOS Signature The DOS Signature refers to the 'magic number' 55aah, the Assembly Language Jump to Boot Code is a DOS requirement according to the author along with a NOP after it, precisely as the menuetOS author is doing. The Disk Paramters Needed by DOS are those that the menuetOS author has included on his code, finally the actual boot strapper code is located in Assembly Language Boot Code, the Error Messages and System File Names are also part of that if I'm not mistaken but are this FAT system specific code of the author.
__________________
Lo, there do I see my father. 'Lo, there do I see My mother, and my sisters, and my brothers. 'Lo, there do I see The line of my people... Back to the beginning. 'Lo, they do call to me. They bid me take my place among them. In the halls of Valhalla... Where the brave... May live... ...forever.. GrimBB | Mimesis |
|
|
|
|
|
#15 |
|
King of Portal
|
Ya my idea doesn't seem to work either. Man this is discouraging, Polyphemus was SO right lol. Don't I have access to the BIOS interrupts once the BIOS transfers control to my boot loader?
__________________
Lo, there do I see my father. 'Lo, there do I see My mother, and my sisters, and my brothers. 'Lo, there do I see The line of my people... Back to the beginning. 'Lo, they do call to me. They bid me take my place among them. In the halls of Valhalla... Where the brave... May live... ...forever.. GrimBB | Mimesis |
|
|
|
|
|
#16 |
|
Programmer
|
Yes.
I don't see why you would need to declare the FAT header if you're not doing any FAT operations yet. |
|
|
|
|
|
#17 |
|
King of Portal
|
I don't know why either, but apparently Bochs requires it 'cause I just got some workng code! :banana:
jmp boot_code nop SystemID db 'ComandOS' BytesPerSector dw 512 SectorsPerCluster db 1 ReservedSector dw 1 NumOfFATS db 2 RootDirEntries dw 224 SectorsOnDisk dw 2880 FormatID db 0f0h SectorsPerFat dw 9 SectorsPerTrack dw 18 NumOfHeads dw 2 HiddenSectors dd 0 BigSectors dd 0 DriveNumber db 0 Reserved db 0 ExtendedBootSig db 029h VolumeSerialNum dd 0 VolumeLabel db 'COS DISK ' FileSystemType db 'FAT12 ' boot_code: mov ah, 0eh mov al, 97 int 10h @@: nop jmp @b times 0x1fe-$ db 00h db 55h,0aah
__________________
Lo, there do I see my father. 'Lo, there do I see My mother, and my sisters, and my brothers. 'Lo, there do I see The line of my people... Back to the beginning. 'Lo, they do call to me. They bid me take my place among them. In the halls of Valhalla... Where the brave... May live... ...forever.. GrimBB | Mimesis |
|
|
|
|
|
#18 |
|
Newbie
Join Date: Nov 2006
Posts: 1
Rep Power: 0
![]() |
Hi, This post is very informative, however I would like some specific information. If someone can help me then please send me a private message. Best Regards,
|
|
|
|
|
|
#19 |
|
Hobbyist Programmer
Join Date: May 2006
Location: West Jordan, Utah, United States
Posts: 176
Rep Power: 3
![]() |
When you use 'int 10h', you are telling your BIOS that you want to change the display mode to whatever mode is in register ah.
It is possible your hardware's graphic mode 9 is not the same as it is in Boch's. In this case you may be displaying pixels rather than text or something like that and the pixel may be too dim or small to see. Make sure you are using the right modes with your 10h interrupt. (I do know it works now, though.) Just a thought. P.S. Remember, usually in text mode one memory location is the character and right next to it are the color settings. Putting a string into memory on your gfx card won't usually work. |
|
|
|
|
|
#20 | |
|
Caffeinated Neural Net
![]() Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,038
Rep Power: 5
![]() |
Quote:
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot. - Vaarsuvius, Order of the Stick |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| tables dont work in firefox; they work in IE | angry_asian | HTML / XHTML / CSS | 3 | Aug 5th, 2006 6:00 PM |
| my console apps just close...system("pause") doesnt work | angry_asian | C++ | 22 | Jul 2nd, 2006 4:38 PM |
| Help:::::::: Why Wont This Work?????? | paulchwd | ASP | 1 | Jul 10th, 2005 1:34 PM |
| Can't get loop to work | rockybalboa | Java | 3 | Mar 20th, 2005 6:19 PM |
| 40 Things you'd like to say out loud at work | big_k105 | Coder's Corner Lounge | 11 | Jan 25th, 2005 2:13 AM |