flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
macgub 20 Nov 2023, 20:16
Just curious - what hardware you have???
If you are cd/dvd owner - you can burn cd in floppy emulation mode.. Many software tools have this option (for sure ex. CD burner XP WIndows tool). |
|||
![]() |
|
SeproMan 20 Nov 2023, 21:15
You found this code online, but I doubt it's a good example!
Code: cld ; Clear direction flag to ensure instructions like ; lodsb use forward movement. xor ax, ax ; AX=0 (use for segment) mov ss, ax mov sp, 0x7c00 ; Set up stack to grow down from 0x0000:0x07c00 ; in region below the bootloader mov es, ax The above instructions really belong to directly below the 'ORG 0x7C00' directive. Also the 'mov ds, ax' instruction is still missing, and the print_string procedure relies on it being set up properly! Do notice that the first comment in KERNEL.ASM Code: use16 org 0x0000 ; Since CS will be 0x07e0 we need an origin of 0x0000 does not match the far jump in the BOOTLOADER.ASM Code: jmp 0x0000:0x7e00 ; Jump to physical address 0x07e00 by setting CS ; to 0 and IP to 0x7e00 Quote: Bootloader and "Kernel" or Stage 2 don't really know if I must use a second boot file really, The bootloader code must fit in only 512 bytes. If your kernel is to be any serious, then it won't be possible to stay within those 512 bytes. So yes, you need 2 files. _________________ Real Address Mode. |
|||
![]() |
|
Kitsune 20 Nov 2023, 21:50
macgub wrote: Just curious - what hardware you have??? @macgub I have a laptop computer with Debian Linux installed on it for compile the asm code and create floppy from command line, and PCem as a virtual machine software. SeproMan wrote:
@SeproMan Have you ressources I can learn about 16bits OS creation in assembly? This source code works despite what you said about the jump to adress command I have tested it. In the meantime, I found a Youtube "tutorial" on creating an OS, maybe that's a better way to learn it. But if you have good books about this kind of knowlege (16bits OS in assembly in DOS era) it's welcome! _________________ Kitsune |
|||
![]() |
|
SeproMan 20 Nov 2023, 22:21
Good online resources include:
A more theoretical approach: https://wiki.osdev.org/Bootloader A more hands-on approach: https://stackoverflow.com/questions/tagged/assembly Then use the search function filling in [Bootloader][x86-16] You'll see that many of the best answers there were contributed by users Michael Petch and Sep Roland, (amongst others of course). On the stackoverflow site you can also ask for help with your programming troubles. Quote: This source code works despite what you said about the jump to adress command I did not say that anything was wrong with the far jump itself. It's the comments that go along with it that are contradicting each other. ![]() _________________ Real Address Mode. |
|||
![]() |
|
Kitsune 20 Nov 2023, 23:03
The above code is from this page:
https://forum.osdev.org/viewtopic.php?f=1&t=32452 It's on the same website you mentionned. I will look at these links. Thanks you for the ressources and help. Good night. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.