flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Strange Problems with Boot-Loader...

Author
Thread Post new topic Reply to topic
Meister



Joined: 09 Feb 2008
Posts: 10
Meister 09 Feb 2008, 19:54
Hello. I'm working on a own DOS-Like-Operating System, written with Flat Assembler (under Win3.11/DOS 6.22). Everything works fine - I'm using 80286-Instructions. I've tested the Bootloader and Kernel on 486SX, Pentium I, AMD Athlon and even on AMD Dual-Core CPUs. Its working fine. Today, I'm tested it on a real 80286 and it hangs - No CPU-Test (test Flags, if 80286 or higher is available), no INT $13 (Read Sectors). I'm absolutely sure, that all Commands are for 8086, 80186 and 80286. Is it possible, that FASM generates Codes for CPUs > 386 as default?
Post 09 Feb 2008, 19:54
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20299
Location: In your JS exploiting you and your system
revolution 09 Feb 2008, 20:08
Have a look here for macros to ensure you only use 80286 codes. It has been extensively tested on real 80286's with no problem. You can't accidentally use eax or jmp dword xx etc.

I suspect the main problem is the jcc, this is a problem I also had with a genuine 80286 and I solved it with the macros in the link.
Post 09 Feb 2008, 20:08
View user's profile Send private message Visit poster's website Reply with quote
Meister



Joined: 09 Feb 2008
Posts: 10
Meister 09 Feb 2008, 20:17
Thank you very much. I will try it Smile I also think, that this is the problem, because even the first 5 lines doesnt work on the 286 (and there is ja JNZ xxxx).
Post 09 Feb 2008, 20:17
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 13 Feb 2008, 05:32
Tell us if it works. Oh, and a screenshot or two wouldn't hurt. Wink

(just glad to find another 16-bit person, heh)

P.S. Ever seen MikeOS? (NASM but still good, heh)
Post 13 Feb 2008, 05:32
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 13 Feb 2008, 16:44
Maybe MiniDos may help, (a 2k Dos clone, coded in fasm).
http://board.flatassembler.net/topic.php?t=5275
Post 13 Feb 2008, 16:44
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 14 Feb 2008, 18:41
It's true, FASM will generate 386+ jumps if it doesn't fit. Your best bet (besides above-mentioned macros or MCD's ONLY8086.INC) is to explicitly say "ja short Mylabel". At least then it will give you an error if it won't fit. (A simple regex search/replace via sed or your favorite editor should fix all such jump instructions in your sources for you.)
Post 14 Feb 2008, 18:41
View user's profile Send private message Visit poster's website Reply with quote
Meister



Joined: 09 Feb 2008
Posts: 10
Meister 03 May 2008, 20:48
Sorry for the long break, I've took. But now, I'm back and the OS is still in Development Smile Here is the homepage (german): www.geocities.com/timo_brueggmann and I attached a screenshot, running BonnyDOS on an IBM Thinkpad (the owner is a very good betatester Smile )

At first, the Bootloader enables the A20-line, check the state and reads the kernel (at the moment 10,5K). Then the kernel is moved to the first 64K above the 1M. The Kernel is now active, checks the memory-config, and loads the command-line interpreter (about 5k) from disk. The SHELL executes a start-script, if available, and after that, SHELL is waiting for input Smile At the moment, there are some internal commands (DIR, SORT, REN, DEL, EXECUTE, VERSION, ASK, PRINT, and some more) and a few commands on disk (INFO, DEVICE, PAR a resident Device, INSTALL). I hope, soon there are more commands and a complete HD-Support. Smile


Description: Screenshot
Filesize: 260.25 KB
Viewed: 3498 Time(s)

t21_bdos.jpg


Post 03 May 2008, 20:48
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 05 May 2008, 17:52
Looks nice. Good luck to you! Very Happy
Post 05 May 2008, 17:52
View user's profile Send private message Visit poster's website 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.