vdamewood has quit [Quit: My Unrecognized Mac has gone to sleep. ZZZzzz…]
mpetch has quit [Quit: Client closed]
bessieTheBoy has quit [Quit: Client closed]
LainExperiments has joined #osdev
heat has joined #osdev
edr has quit [Quit: Leaving]
IMSOASIAN has joined #osdev
<IMSOASIAN>
In some bootloader code I've been reading, the assembly starts off by clearing all interrupts (cli) and then executing the following line of code: "mov %cs, %ax". As far as I know, the DL register is the only one guaranteed to be set upon BIOS handoff, so why is CS being copied as if it is valid?
<zid>
cs is a segment selector not a 'register'
<zid>
and it's definitely valid, because it describes where the instruction pointer is
<zid>
and if it wasn't there.. that code wouldn't be running at all
<zid>
linear = cs*16+ip;
<heat>
you need to know cs because of some segment register shenanigans
<heat>
where it can point to the same 0x7c00 address in two different ways
<heat>
IIRC, that is
<zid>
heat: You can access it 65k/16 ways
<zid>
:D
<heat>
yeah but there are two common ways to do it
<heat>
i dont know the deets because who writes a bootloader
<zid>
yea either 0 or 7C0
<zid>
and you org 0 or you org 7c00
<heat>
a BIOS bootloader even
<heat>
the gang tries to figure out what interrupt to use to read from disk
<IMSOASIAN>
10h, right?
<zid>
impossible task
<zid>
which ah value?
<IMSOASIAN>
True lol
<zid>
13h?
<heat>
all of them zid
<IMSOASIAN>
I haven't memorized it that much yet XD
<zid>
41h,13h?
<heat>
dont worry, dont memorize it
<heat>
dont even write one to begin with
<zid>
yea just.. don't
<heat>
if you really want to write a bootloader, write an EFI bootloader, seriously
<zid>
This tech is 50 years old and barely worked then
<heat>
it's wayyyyyyyyyy easier
<zid>
90s or riot, grub is life
<zid>
2010 never happeed
<heat>
have i ranted here how grub thinks its the only thing running in an EFI system
<zid>
it will be, momentarily
<zid>
good enough
<heat>
so it consistently overrides the firmware's own device and filesystem drivers
<zid>
good
<heat>
it's a lovely mess
<zid>
installing grub-efi means "I wish to fuck off from efi asap"
<zid>
so it doing that is correct
<IMSOASIAN>
At least it's not the MBR sector warning, though it's also correct in doing that. Who knows why Flex writes to the MBR?
<zid>
I don't even know what Flex is
<IMSOASIAN>
Neither do I.
<zid>
??
<zid>
"Why is my dog barking at the door?" "Which dog?" "I don't have a dog"
<heat>
i wish i was insane enough to imagine dogs
<heat>
that must be a blast
<IMSOASIAN>
GRUB on MBR systems outputs an error sometimes saying that a product called Flex-something has written to the MBR, and it cautions against it. I'm assuming it's Windows-related.
<heat>
idk
<zid>
I'm finding references to it at least
<heat>
FlexNet
<heat>
software license manager that overwrites mbr
<heat>
lol fuck me
<zid>
sounds like you just happened to match some checksum or something
<zid>
of some mbr worm that grub is able to detect
<heat>
we're close to getting the riot anti-cheat to do the same
<zid>
wipe sector 32 of the drive
<zid>
is apparently how you make it shut up
<IMSOASIAN>
That makes sense. Anyways, thanks for the information guys, I'll read up more on the different types of "registers".
<zid>
or just, don't:P
<IMSOASIAN>
I like a challenge :)
<zid>
it's not really a challenge it's just kind of useless info
<zid>
selector*16+offset is the answer
<heat>
yes, it's not a challenge, it's literally useless
<heat>
like, literally
<heat>
this is barely relevant to osdev at all
<zid>
and the effective problem you can solve with them is.. using more than 64kB of memory in a real mode application
<heat>
real mode is another thing you barely need to know
<IMSOASIAN>
I thought you were referring to the BIOS bootloader. In that case, I won't read up on it.
<IMSOASIAN>
That's true, I plan on not spending much time on it.
<heat>
we are referring to the bios bootloader
<heat>
hint: this "real mode" and these "segment registers" are also almost universally only useful on BIOS bootloaders
<zid>
the bios copies you to 7C00h linear, which means cs is some fraction of that divided by 16, and your ip is some value that makes up the remainder... but afaik it's a bug to not set it to 7C0:0000
<zid>
there, full education
<zid>
now install grub or something
<heat>
real mode is a horrible horrible historical wart and you'll make me cry if you write a BIOS bootloader
<heat>
you don't want to make me cry do you?
<heat>
(this is giving zid some motivation to write a BIOS bootloader)
<zid>
I mean, I do, but I want it to hurt emotionally not physically. I'm going to *hurt* you, not make you cringe to death.
<zid>
^
<IMSOASIAN>
No, but I suppose that's how it'll end up being.
<heat>
you're making me cry? really?
<heat>
please please install grub please i mean PLEASE install grub install syslinux install fucking limine for all i care
<heat>
I JUST ADVOCATED FOR LIMINE
<heat>
YOURE MAKING ME DO THIS
<zid>
You've broken him
<zid>
he told someone to install limine
<zid>
I hope you're happy
<IMSOASIAN>
I've used GRUB, I'm not doing this out of ignorance lol
<IMSOASIAN>
The truth of the matter is -- at least for me -- that I don't have many modern computers, and BIOS booting allows for support on a ton more computers.
<zid>
so install grub
<Mutabah>
grub supports very old computers, definitely anything x86 you can get your hands on
<Mutabah>
(if it's 386 or later, grub legacy should work)
<IMSOASIAN>
That's true, fair point.
<IMSOASIAN>
I don't know why, but I just want to write something of my own. Sorry to disappoint :D
<zid>
remember dos4gw? That's basically what grub sets up for you
<zid>
You don't need to write a *bootloader* though
<zid>
that's a horrendous project that we're trying to get you not to write
<Mutabah>
If you want to do it for the explicit fun goal of writing a bootloader, go for it
<IMSOASIAN>
It would be cool though!
<zid>
write a dos program if you wanna write some real mode code
<Mutabah>
but don't do it if you want to step up towards non-real-mode code
<zid>
at least sometimes you won't have to reboot the entire machine every time, that way :P
<zid>
just most of the time
<IMSOASIAN>
Lol yeah.
<IMSOASIAN>
I probably won't maintain one in the long-run, I'm just writing a quick and haphazard thing for now.
<zid>
I wrote some fun bare metal stuff
<zid>
but never a bootloader
<zid>
I made a floppy disk that if you left it in, the computer did a SWEET fireplace effect on the display
<kof673>
you can write a bootloader, but what are you going to boot?
<IMSOASIAN>
I'm working on a kernel with a tutorial, it's pretty good.
<IMSOASIAN>
The tutorial, not my kernel.
<zid>
If it advocates you writing some real mode code, burn it
<IMSOASIAN>
It doesn't :)
<IMSOASIAN>
It's the same one the developer of osakaOS used, if you guys know that project.
<zid>
no, we just sit here saying how cool it'd be if we could be bothered to write our own OS, and how rad it'd be, and what mistakes we wouldn't do, mainly
<zid>
except heat, he just copy pastes linux source
<Mutabah>
IMSOASIAN: which tutorial? we tend to know the tutorials, not the projects based on them
<IMSOASIAN>
Do I announce when I'm leaving? I forgot the customs, I haven't been on IRC in years.
<heat>
depends
<zid>
depends if we like you, mainly, or you have a good punchline
<heat>
usually uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh not really
<zid>
I'd typically only announce if I was in the middle of a convo and I had to go
<heat>
anyway kernal progrmaming linux kernal operating system dot write grub dont writ egrb use it pleae use plase
heat has quit [Quit: Leaving]
<zid>
so I was like "ack, sorry guys, cat's on fire, back later"
<IMSOASIAN>
heat will cry and I will too, 'tis the season for bootloader programming.
<IMSOASIAN>
Wait, that wasn't a punchline.
<IMSOASIAN>
Oh well.
IMSOASIAN has quit [Quit: Leaving]
<kof673>
#@$##@$@$#$$@##@
<kof673>
> Why do ligatures even exist in the digital age? <points at chimera>
<the_oz>
oh no a .. a ... a zalgo...
<kof673>
they can be used to pinpoint locations ;D > the yali has a cat-like graceful body, but the head of a lion with the tusks of an elephant (gaja), and the tail of a serpent > the vahana of Budha (Mercury)
<kof673>
it is like a checksum, built-in redundancy :D
<kof673>
error correcting code
qubasa has joined #osdev
Gooberpatrol66 has quit [Quit: Konversation terminated!]
SGautam has quit [Quit: Connection closed for inactivity]
vdamewood has quit [Quit: My Unrecognized Mac has gone to sleep. ZZZzzz…]
Ermine has quit [Read error: Connection reset by peer]
spareproject has quit [Remote host closed the connection]
hwpplayer1 has joined #osdev
heat has joined #osdev
<heat>
good afternoon onyx users
<heat>
terrible afternoon to everyone else
<sortie>
Unfortunately heat uses linux
<heat>
no i use onyx
Ermine has joined #osdev
the_oz has quit [Remote host closed the connection]
the_oz has joined #osdev
<fedaykin>
howdy ladies and gentlemen =)
<sortie>
And every in-between and non-believers in the law of the excluded middle, welcome all, come on in, have a warm beverage and let's share the tales of your osdev today
mpetch has quit [Quit: Client closed]
<sortie>
Today I am working hard on my package management. I took my build-aux/build-ports.sh script of Sortix and made it into my tix-metabuild(8) script that is reusable for building binary packages for any custom ports directory
<sortie>
heat, how goes rpm? What's the angular velocity?
housemate has joined #osdev
xenos1984 has quit [Ping timeout: 260 seconds]
<heat>
rpm is fine
<heat>
it's plenty featureful and data safe
<heat>
that's good
<heat>
otoh it's a little annoying when it comes to actually packaging files, you need to explicitly list what files are part of the package
xenos1984 has joined #osdev
<heat>
i suppose that's also indirectly good but, you know, annoying
<sortie>
Yeah. BSD ports do that too
<sortie>
Sortix ports include anything in the DESTDIR but I usually do look at what that is, though not so much on upgrades though
<heat>
as for actually packaging, well it's just annoying
<heat>
building deps and deps of deps
teroshan has joined #osdev
<heat>
and sometimes stubbing annoying shit out (that fedora thinks is worth building, like vim depends on gtk and stuff, etc)
<Matt|home>
hello.
<sortie>
Hello Matt|home this is sortie@home :)
<sortie>
What's your osdev today?
<Matt|home>
there's a specific way i need to manipulate an array, and it's giving me a headache. this isn't osdev related. i likely won't post any of my os dev stuff here.
<Matt|home>
the correct solution for this problem is tokenization, but i want to do some performance related tests so im doing things the extremely painful way.
<Matt|home>
i have no idea if it's even possible
<sortie>
Feel free to ask :) Not much else going on and a big part of osdev is just regular ol' programming
<Matt|home>
i'll figure it out myself, but basically the problem is i don't know how many times i'll have to recursively check the contents of an array to grab data from it at arbitrary points in the array. if that sounds like word salad don't worry about it, it's dumb to begin with
<heat>
why would you say that
annamalai has quit [Ping timeout: 265 seconds]
<Matt|home>
well frankly speaking im not entirely sure it's solvable the way i want to do it. im bad at visualizing stuff like this, so i wind up writing it down on paper and then when i go to write it in code i very swiftly get lost
<Matt|home>
but whatever, this isn't some millenium puzzle prize or whatever
annamalai has joined #osdev
goliath has quit [Quit: SIGSEGV]
<sortie>
Matt|home: That sounds vaguely like a parser problem. You may want to look a bit into the theory around that. The question is e.g. whether the language you're tokenizing is able to do so without more than N tokens of lookahead
<sortie>
(and the current state you're in)
Arthuria has joined #osdev
<Matt|home>
it is a parser problem. im effectively writing 3 versions of a parser, one using a hybrid array/tokenizer, a classic tokenizer, and one using the worst code you've ever seen
vdamewood has joined #osdev
xenos1984 has quit [Ping timeout: 252 seconds]
eddof13 has quit [Quit: eddof13]
eddof13 has joined #osdev
xenos1984 has joined #osdev
Turn_Left has joined #osdev
Left_Turn has quit [Ping timeout: 244 seconds]
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
Turn_Left has quit [Ping timeout: 265 seconds]
eddof13 has quit [Quit: eddof13]
eddof13 has joined #osdev
housemate has quit [Quit: Nothing to see here. I wasn't there. I take IRC seriously.]
housemate has joined #osdev
housemate has quit [Client Quit]
stolen has quit [Quit: Connection closed for inactivity]
Left_Turn has joined #osdev
goliath has joined #osdev
Dead_Bush_Sanpa1 has joined #osdev
Dead_Bush_Sanpai has quit [Ping timeout: 248 seconds]
Dead_Bush_Sanpa1 is now known as Dead_Bush_Sanpai
<nikolar>
Matt|home: is that for aoc perchance
vdamewood has quit [Quit: My Unrecognized Mac has gone to sleep. ZZZzzz…]
housemate has joined #osdev
<heat>
PERCHANCE
housemate_ has joined #osdev
housemate has quit [Read error: Connection reset by peer]
housemate_ has quit [Remote host closed the connection]
<nikolar>
i have never heard perchance used in serbian heat
housemate has joined #osdev
<heat>
перчанце
xenos1984 has quit [Read error: Connection reset by peer]
<nikolar>
wrong heat
xenos1984 has joined #osdev
<the_oz>
what's wrong with language having cliques other than commonality?
<the_oz>
if it weren't, I'd be doomed to zoomspeak or some shit
housemate has quit [Remote host closed the connection]
housemate has joined #osdev
housemate has quit [Ping timeout: 252 seconds]
hwpplayer1 has quit [Remote host closed the connection]
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
housemate has joined #osdev
sprock has joined #osdev
housemate has quit [Ping timeout: 265 seconds]
hwpplayer1 has joined #osdev
craigo has joined #osdev
_ngn- has joined #osdev
_ngn has quit [Remote host closed the connection]
_ngn- is now known as _ngn
<mcrod>
that's life... that's liiiiiiife
<mcrod>
that's what all the people sayyyy
<mcrod>
you're ridin' high in april, shot down in mayyy, but i know i'm gonna change that tuuuune when i'm back on top, back on top in juuuune
housemate has joined #osdev
housemate has quit [Read error: Connection reset by peer]
housemate has joined #osdev
housemate has quit [Remote host closed the connection]
<Matt|home>
<nikolar> Matt|home: is that for aoc perchance <-- no actually it's a personal project. my sister, my wife and my best friend are all doing advent, but i just don't have time right now
<nikolar>
fair enough, just curious
<Matt|home>
nikolar - basically im in a competition with my sister over a calculator program. i took a look at tokenization, said it was too complicated and it's better for computers to do things the old fashioned human way
<Matt|home>
now im paying for it :p
<nikolar>
sounds about right
<Matt|home>
i believe my logic at the time was: array indexing is faster than the methods tokenizers use, therefore it's better to use direct array manipulation parsing the string _before_ tokenizing the entire thing
<Matt|home>
thinking back on it, i was really high at the time and im pretty sure that "faster" means nanoseconds
<nikolar>
just use lex or somethign
<Matt|home>
it's for a test more than anything
<heat>
flex
<heat>
plus bison
<zid>
uh-oh
<zid>
where's m y comment from yesterday
<zid>
<zid> (levels where the easiest solution is to break out bison, from behind its emergency glass, inside its hollow tungsten sphere)
<zid>
Don't make me point at the sign heat
<heat>
have you had to write a compiler yet
Arthuria has quit [Ping timeout: 276 seconds]
zijjgfs is now known as ring0_starr
housemate has joined #osdev
housemate has quit [Remote host closed the connection]
Left_Turn has quit [Read error: Connection reset by peer]
hwpplayer1 has quit [Quit: See you later Take care !]
<kof673>
> a calculator program i thought that is what people used reverse polish notation for