<Ali_A>
following my previous code (here https://pastebin.com/Lw8rNuPK, only changed sample.asm to print x using interrupt 0x10 ) bootloading a simple OS (that just print the character 'X' to the screen for now using bios) and it does print it (do I assume the kernel was loaded successfully?
<Ali_A>
I am still getting signal trap in GDB
<bslsk05>
pastebin.com: try to load kernel - Pastebin.com
<Ali_A>
I was expecting to see the kernel code at 0X500 and not a signal trap
<Ali_A>
could this be an issue that gdb can not debug 16 bit mode?
<Ali_A>
and showing signal trap for some reason?
blockhead has quit [Ping timeout: 256 seconds]
<heat>
what's signal trap?
<Ali_A>
heat it is in the video, it just says `signal trab`
<Ali_A>
SIGTRAP to be exact not how to print it (I assume it s at address 0X0000?)
<heat>
shrug
<heat>
probably doesn't support 16-bit
<heat>
or you're doing something wrong when setting up gdb
<Mutabah>
Try with qemu's `-d int` support to see register dumps?
<Ali_A>
I will try that
<Ali_A>
Mutabah
<Ali_A>
I can not understand the output clearly but looking at those registers + segments I can tell
<Ali_A>
DS was never set to 0X50
<Ali_A>
and also EIP never become 0x7c00
<Ali_A>
(so not sure what happened there)
<Mutabah>
You're looking at the end of the file?
<Mutabah>
(There's a lot from the BIOS in that dump0
<Ali_A>
Mutabah
<Ali_A>
I am just looking at the output of qemu, when I was running it and executing gdb commands it was dumping something to the console
<Ali_A>
there is no file as far as I can see in the directory
<Mutabah>
yeah, I'm used to running with `-D output_file.log` which redirects that to a file
<Mutabah>
Ok, just watched the video.
<Mutabah>
1. I think you need to specify 16-bit in the architecture (don't know for sure how to do that)
<Mutabah>
2. Try single steping until that trap is hit
heat has quit [Remote host closed the connection]
<klange>
someone on github with the profile text "
<klange>
Always amazed by the Linux kernel
<klange>
"
<klange>
oh f*** you firefox, copying linefeeds with that...
<klange>
anyway, someone with that profile text on github just followed me this morning and all I could think was why the hell are you following _me_ then
thinkpol has quit [Remote host closed the connection]
thinkpol has joined #osdev
<Griwes>
maybe looking at your skulls of the damned makes them even more amazed by the linux kernel? ;D
epony has joined #osdev
sonny has quit [Remote host closed the connection]
<klange>
I've gotten rid of a lot of the skulls! They've gone to good homes.
<klange>
Lots of theatres.
<klange>
Every skull of a damned dreams of playing Yorick in a stage production of Hamlet.
<Ali_A>
Mutabah I tried looking a lot online, couldn't find how to get into 16 bit for gdb
<Ali_A>
also I surely tried stepping but for some reason, once I encounter int 13h it just shows something very weird
<klange>
frankly not even sure gdb supports real mode debugging meaningfully; recommend bochs's built-in debugger for that sort of stuff
Terlisimo has quit [Quit: Connection reset by beer]
<Ali_A>
let me google boch and see what I can come up with
<Ali_A>
the thing is, I can print things to the bios from the screen, so I assume that it works?
<Ali_A>
I am not really sure
Terlisimo has joined #osdev
Vercas has joined #osdev
<Mutabah>
Another trick to try: Manually (by writing to the video RAM region) set the upper-left character of the screen at various locations in your code
xenos1984 has quit [Read error: Connection reset by peer]
<Mutabah>
use this to determine where it fails
<Ali_A>
Mutabah
<Ali_A>
I tried playing with kernel code, and it seems to work without any problem, another guy did also suggests that is probably just gdb not being able to debug 16 bit mode
<Ali_A>
+
<Ali_A>
what is the trick? I didn't understand it fully
nyah has quit [Quit: leaving]
<Mutabah>
Yeah, gdb probably doesn't like real mode (I think `8086` as the architecture _might_ work? but I've never needed to)
<Mutabah>
(I tend to avoid bootloaders, they're just a waste of time unless your target is "write a bootloader")
<Mutabah>
I assume you're debugging an issue in your real-mode code, correct?
Arthuria has joined #osdev
<klange>
+1, my recommendation is to use something off-the-shelf like grub or that stivale - I think the folks that run the Discord are behind that? - at least to get started, and when you've got a solid idea of what you actually need out of a bootloader and your project is far enough along that having your own is a necessary thing, then you can circle back and write one
<klange>
Also multiboot, as much as it has functionality gaps, is actually really nice for debugging with qemu since you can have it load your kernel directly
<Ali_A>
thanks guys!
<Ali_A>
I was asking a guy at ##asm on how to print the address of the current instruction( I thought if I can get the kernel to print its address, then I can be sure that it is working and gdb is dump)
<Ali_A>
and the guy suggested few things including changing jmp 0x50:0x0 to 0x0:0x500 and put org 0x500 at the top of my kernel code and that actually worked
xenos1984 has joined #osdev
<Ali_A>
actually I was just following the book recommended by osdev wiki which started in a bootloader,
<Ali_A>
so I thought that is the right way to start OS dev (my target is to make an OS not a bootloader)
<Ali_A>
Mutabah
<Ali_A>
klange
<Ali_A>
thanks a lot!
Vercas has quit [Ping timeout: 240 seconds]
<klange>
I don't know which book you are referring to. We have a list of books that are considered okay, but we don't really recommend anything on the wiki, and I think many of the wiki editors share the sentiment that books are bad because they can't be updated.
Vercas has joined #osdev
<Mutabah>
The wiki has a LOT of different opinions on it, many of which disagree
[itchyjunk] has quit [Remote host closed the connection]
Arthuria has quit [Ping timeout: 240 seconds]
_xor has quit [Quit: WeeChat 3.4]
sonny has quit [Quit: Client closed]
sebn has joined #osdev
sebn has quit [Quit: Leaving]
sebn has joined #osdev
zaquest has quit [Quit: Leaving]
zaquest has joined #osdev
rwb has quit [Excess Flood]
rwb has joined #osdev
rwb is now known as rb
lainon has joined #osdev
eddof13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lainon has quit [Ping timeout: 256 seconds]
sebn has quit [Remote host closed the connection]
lkurusa has joined #osdev
C-Man has quit [Ping timeout: 252 seconds]
_xor has joined #osdev
_xor has quit [Quit: brb]
Belxjander has quit [Ping timeout: 250 seconds]
toulene has quit [Ping timeout: 240 seconds]
toulene has joined #osdev
the_lanetly_052 has joined #osdev
GeDaMo has joined #osdev
Ali_A has joined #osdev
Ali_A has quit [Client Quit]
gog has joined #osdev
<gog>
mew
nyah has joined #osdev
C-Man has joined #osdev
* moon-child
pets god
<kingoffrance>
gog (~ada@user/gog) nyah well there's a trinity now
<kingoffrance>
in the beginning was the nyah, and the nyah was with gog
lainon has joined #osdev
* vdamewood
gives gog a fishy
dude12312414 has joined #osdev
Coldberg has joined #osdev
C-Man has quit [Ping timeout: 272 seconds]
Payam54 has joined #osdev
* gog
eats fishy
dennis95 has joined #osdev
Arthuria has joined #osdev
lkurusa has quit [Ping timeout: 240 seconds]
<papaya>
I wonder how god would react to being pet.
<papaya>
"moon-child pets god" lol
lainon has quit [Quit: WeeChat 3.4]
srjek has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
Burgundy has joined #osdev
nur has joined #osdev
<gog>
the cat, the kitten, and the holy nyaaa
wand is now known as teard0wn
teard0wn is now known as teardown
<papaya>
that's a catchy title
teardown has quit [Quit: leaving]
wand has joined #osdev
wand has quit [Client Quit]
wand has joined #osdev
eddof13 has joined #osdev
Payam54 has quit [Quit: Client closed]
Payam49 has joined #osdev
eddof13 has quit [Client Quit]
theruran has joined #osdev
heat has joined #osdev
mahmutov_ has joined #osdev
sonny has joined #osdev
Matt|home has quit [Quit: Leaving]
sonny has quit [Ping timeout: 256 seconds]
Payam49 has quit [Quit: Client closed]
srjek has quit [Ping timeout: 240 seconds]
dennis95 has quit [Quit: Leaving]
the_lanetly_052 has quit [Ping timeout: 268 seconds]
heat has quit [Ping timeout: 260 seconds]
Arthuria has quit [Ping timeout: 260 seconds]
the_lanetly_052 has joined #osdev
sonny has joined #osdev
the_lanetly_052 has quit [Ping timeout: 240 seconds]
skipwich_ has joined #osdev
sonny has quit [Quit: Client closed]
pieguy128_ has joined #osdev
skipwich has quit [Quit: DISCONNECT]
pieguy128 has quit [Ping timeout: 260 seconds]
X-Scale` has joined #osdev
GeDaMo has quit [Killed (NickServ (GHOST command used by GeDaMo1!~GeDaMo@82-69-2-253.dsl.in-addr.zen.co.uk))]
GeDaMo has joined #osdev
X-Scale has quit [Ping timeout: 272 seconds]
X-Scale` is now known as X-Scale
sonny has joined #osdev
sonny has left #osdev [#osdev]
dude12312414 has joined #osdev
amazigh has joined #osdev
pieguy128 has joined #osdev
pieguy128_ has quit [Ping timeout: 252 seconds]
pieguy128 has quit [Max SendQ exceeded]
pieguy128 has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
srjek has joined #osdev
GeDaMo has quit [Remote host closed the connection]
xenos1984 has quit [Remote host closed the connection]
xenos1984 has joined #osdev
papaya has joined #osdev
papaya has quit [Changing host]
Likorn has joined #osdev
Likorn has quit [Client Quit]
papaya has quit [Quit: leaving]
papaya has joined #osdev
heat has joined #osdev
k8yun has joined #osdev
JanC has quit [Ping timeout: 252 seconds]
JanC has joined #osdev
mahmutov_ has quit [Ping timeout: 250 seconds]
heat has quit [Remote host closed the connection]
Burgundy has quit [Ping timeout: 260 seconds]
janemba has quit [Ping timeout: 256 seconds]
janemba has joined #osdev
sonny has joined #osdev
<sonny>
So after doing some thought ... c++ actually seems like a reasonable language to do OS implementation because of it's memory management library. (Although at this stage, why not rust?). I think you can go a long way by having a reference type that has some additional information.