Assembly os x64 custom kernel and bootloader
- 26 Devlogs
- 194 Total hours
Os in assembly custom kernel , shell and 2 stage bootloader Will be Tsted on my PC and after that custom bios because this bios that I have is too ass
Os in assembly custom kernel , shell and 2 stage bootloader Will be Tsted on my PC and after that custom bios because this bios that I have is too ass
Ok I have found the solution instead of looking trough all ports it stops on the firt found idk how it works but it works now I can extract data from disk
Something is very very not good I have no idea every marker fires but it never gets to shell so now me need to debug me hate this shit
Ok guys I now need to post posts every 10 hrs but that big problem for me cuz sometimes 10 hrs isn’t enough to make smth actually functional and show someone that doesn’t know assembly what it does unlike the others which you can see on the display. Anyway so what I did now Is bruteforcing bus device and function label strg than naxt thing what happens label ttwo checks every found device if it is ahci device if yes saves it and moves on with the list and now after full port bruteforcing is done label steb stops the device on the found ahci port /bus /smth smth then waits for acknowledgment from device aaah - start of zot zeroes out a block of memory then the other zot sets up some shi forgot the names they are smth like cap hba bar5 and other stupid names they are dozens of these stupid names I didn’t remember which one is which cuz that will be even harder to write that code for me , the way I did it I just looked up what does the device expect and tried to make it until it worked this explanation is fir the c kiddies out there that never in their life touched assembly and say that writing in assembly is ass current mentioning @PavolUlicny my message for you “you are chud and stop writing in c transition to assembly” but you might say why do all this shi , cuz it opens up my ability to read and write to storage
Added whatindr just copied function whatincr and changed registers
I added so when the user types it automatically moves screen to VGA buffer so it doesn’t overwrite bad memmory and implemented this thing for cpritn too so if you are near end of the screen it automatically moves up (number of rewrites this function took 3) in pic you can see how cpritn automatically moved up
Added translate and command to see what in memory I had to make a new function to accept hex and Dec and figure out which one is which than grab byte from memory not 8 bytes was stuck on that then output which was easy cus I already have function for that then added translate which just uses hexbin function for Dec and bin for hex and outputs in the other format also I don’t have much time to code because I am a slave on a construction now and I get paid absolute minimum
Ok so today I have made saythis command which is basically echo (system says what you tell it to) and whatincr which basically spits out what is in control registers which might be useful for some repairman or whatever but I had to make new functions like bintrn which turns normal pc number into decimal ASCII string but I had the loop wrong it started at wrong point but now it should work
Added scroll up it was ass like the other one milión variables I hate this again had to debug everything even thou it is just reversed the first downarrow but the logic was messed up and had to revert copying lines
I am currently on a vacation in Berlin so I don’t have much time to code but whenever I have time I try but back to report I did scrolling so now the user can scroll down still no scroll up because it was really hard to even do Down I did it once but the code was so ass that I just burned it and rewrite it again but it still didn’t work because I forgot to reset and change billion of variables at the end of the code
Added more text commands and started working on command that actually do something like echo also I am working on moving the text up and down and had some issues with wakatime not closing/opening might be caused by moving onto a new device?
Completed the command thing now I can add any command I want I did as first command CLS because I already made a function for it in the code but right now I am just going to add more commands
Did a terminal ui finally also now it supports enter and extended characters (arrows) + mede a systém response but the colors look horrible I need to look up colour theory
Forgot to say in last devlog but i implemented basic user to system but it’s not working it’s just a concept of how it should work now I am finishing it up so In next devlog it should look like a terminal also implement functions client which promints string to screen with any given colour also last devlog was about implementing a curzor and CLS function which clears the VGa screen
Fixed the keyboard thing and made it so you now can write text as a normal text editor also added delete button and some ui improvement
Fixed the keyboard handler now I can freely write but need to set limits cuz someone could delete their system from memory like this
Fixed yesterdays error now going to try it out on real hardware to see if my PC supports virtualization of PS2 keyboard
Tried to implement keyboard press handler bit sadly it no work
Finally transitioned to X64 bit mode now I am able to write the actual os , and I was wondering if I even need to explain what I did to detail because I Know nobody would understand it
Big day today made it run on normal computer
I pulled an all nighter and Finally got it working found out that the quemu was the problem it was printing it but only to VGA output or what and quemu was set to -nographic so It didn’t show nothing but now the problem is when I am in 32 bit mode it starts printing from the start and is overwriting the text written by bios
I hate this shit I wasted 15 hrs debugging this shit and still have no idea what’s wrong I am going to sleep and maybe it will be easier after I will be well rested
I hate this fucking shit literally only thing I do is find error find what possibly could make it fix it and it doesn’t work then I do it again 100 times juts to find out that the fucking bios which promised not to corrupt dl bi interrupt 16 actually does corrupt it whatever this shit still not working but at least I have the core structure for moving into the 32 bit mode I fucking hate this why do all x64 processors have to wake up and say UHM I think I am an IBM processor from 1967 like what that fuck why can’t it be that it drops it directly to x64 like on arm also my PC screen broke so now I am ssh trough Termux to the PC and code like this I fucking hate assembly but low-key need that new PC that old Compaq 6510b wasn’t cutting It with 2 GHz and two cores
Very near 32 bit mode I added memory tester so now the PC knows how much ram it has and also made two (if one fails) a20 alower
Optimized btldr1 to use cpritn more linked it to 2 stage 2 stage loads kernel by DAP persets
did some stuff like lba table implementation so sadly no hard drives and did lba test so if computer too old no boot because it doesnt have extended read auto retry if smth wrong happens and jump to adress 0x7E00 where start of btloader2 is
Did some test of 1# stage bootloader now I need to link it to the 2# stage and then to the actual os