klange changed the topic of #osdev to: Operating System Development || Don't ask to ask---just ask! || For 3+ LoC, use a pastebin (for example https://gist.github.com/) || Stats + Old logs: http://osdev-logs.qzx.com New Logs: https://libera.irclog.whitequark.org/osdev || Visit https://wiki.osdev.org and https://forum.osdev.org || Books: https://wiki.osdev.org/Books
FreeFull has quit []
nyah has quit [Quit: leaving]
kof123 has joined #osdev
<heat> "why is my llvm /bin/clang link taking 20 minutes?"
<heat> shoot me
basil has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
bas1l has joined #osdev
<mjg> it may or may not be running with asserts btw
<mjg> --version will tell you
<heat> no, i'm building llvm
<heat> and my clang most definitely does not have asserts
<heat> not like that matters much IIRC
<heat> mjg, has there been movement on the randstruct front for freebsd?
<heat> apparently new llvm has randstruct built in
<mjg> not that i know of
<mjg> it is a rather dodgy subject innit tho
<heat> is it?
<heat> it sounds pretty legit as a security measure - makes it harder for you to exploit the kernel, and is opt in
<heat> in theory you can Carefully Measure and hopefully not lose too much perf
<mjg> for security is defo great
<mjg> but is a smp perf fucker
<mjg> probably worth it for things like creds
<heat> just don't tag it on perf sensitive shit
<heat> also apparently grsecurity had a version that tried to only randomize cacheline-sized groups of elements
<mjg> now that makes sense
<mjg> afair linukkz slaps the randomizer all over
<mjg> as in all structs
<heat> no? that's pretty impossible
<heat> will go haywire as soon as it tries to randomize struct stat or something
<heat> or struct pt_regs
<mjg> not literally every single one
<mjg> there is clearly abi concerns
<mjg> but for example dentry is treated with it
<heat> shrug, hopefully they measured it
<mjg> :d
<mjg> makes me wonder if ubuntu builds with it
<mjg> it's not like the kernel randomizes at boot time and hotpatches all accessors
<heat> *openbsd theme song*
<mjg> [:
<mjg> rly tho, everyone in ubuntu land is running the same binary
<mjg> assuming the package version matches ofc
<mjg> point being, 0 benefit in that case
<heat> yeah
<heat> and you'd need to know the seed anyway, for kernel modules
<mjg> i think making the image patch itself would be interesting
<mjg> the current code is the easy way out
<moon-child> seems like you should be able to specify an interference graph or whatever
<moon-child> 'these things should be on the same cache line, these different, these don't care'
<moon-child> and it constructs a random layout based on those constraints
<mjg> here comes a mandatory remark how someone randomized for lulz and got a speed up
<moon-child> gets you further than just intra-cacheline
<moon-child> lol
<mjg> it's a classic
<heat> save the seeds that speed you up :^
<mjg> someone turns __read_mostly into a nop and got a speed up
<mjg> gets
<mjg> it's ok unless they claim __read_mostly is therefore bad
<moon-child> profile-guided randomisation?
* moon-child hides
* mjg takes the bong from moon-child
<mjg> you had enough youg man
<klange> So... sdlquake does not like 'large' resolutions... I changed my resolution preference table to prefer 1080p in my BIOS loader recently - that alone was fine, but then I also changed my panel design to make it smaller (and drop the floating thing I did for the last year or two) and _that_ put it over the top and now some things crash unexpectedly...
[itchyjunk] has quit [Read error: Connection reset by peer]
v28p has quit [Ping timeout: 276 seconds]
joe9 has quit [Quit: leaving]
<klange> #define MAXHEIGHT 1024 ← this of course gets used in an array definition, and then completely ignored for a loop that fills it up based on screen height
<Mutabah> kwality
heat has quit [Ping timeout: 252 seconds]
elastic_dog has quit [Remote host closed the connection]
elastic_dog has joined #osdev
<kazinsal> Vintage Programming (tm)
osmten has joined #osdev
_whitelogger has joined #osdev
<sham1> Is there even a FIXME there
<klange> Simply changing it to a larger value does work; though there is a FIXME about it being duplicated in another header and that you must not forget to change both
<klange> I could probably also fix up the lack of a bounds check, but I am lazy, and also rather disinterested at the moment
wlemuel has quit [Ping timeout: 252 seconds]
wlemuel has joined #osdev
rb has quit [Quit: ZNC - https://znc.in]
goliath has joined #osdev
slidercrank has joined #osdev
xenos1984 has joined #osdev
rwb has joined #osdev
pmaz has joined #osdev
netbsduser``` has joined #osdev
netbsduser` has quit [Remote host closed the connection]
rwb has quit [Quit: ZNC - https://znc.in]
rwb has joined #osdev
bgs has joined #osdev
pmaz has quit [Ping timeout: 248 seconds]
rwb has quit [Quit: ZNC - https://znc.in]
rwb has joined #osdev
rwb has quit [Quit: ZNC - https://znc.in]
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
gildasio2 has quit [Remote host closed the connection]
gxt__ has quit [Remote host closed the connection]
gxt__ has joined #osdev
gildasio2 has joined #osdev
rwb has joined #osdev
ZipCPU has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
pmaz has joined #osdev
ZipCPU has joined #osdev
<bslsk05> ​paste.sr.ht: paste.txt — paste.sr.ht
<moon-child> 1g pages are interesting. Used to suck, but on recent uarches, you can fit all your memory into the l2 tlb
<mrvn> assuming you have 1G pages.
<mrvn> where 1G pages ever worse than 2M pages? I know some archs had a split TLB for 4k and for other pages, and not a lot of those. So too many large pages are worse than none.
<moon-child> yes, exactly
<moon-child> there used to be only 4 1g tlb entries. 4g is still a bigger working set then you get with all 2m or 4k pages, but you need to have good locality
<moon-child> or else you're screwed
<moon-child> now you have 1024 1g tlb entries. Can almost certainly cover all your physical memory
gog has quit [Ping timeout: 240 seconds]
<mrvn> but those old systems did they have more than 4 2M tlb entries?
<moon-child> yes
<ddevault> how do I find the size of my 2M TLB on my CPU?
<moon-child> intel optimisation manual lists sizes for some recent intel uarchs
<mrvn> good question. Is there some MSR or cpu info field for that?
<ddevault> 1024 entries is a number I saw in a random SO thread just now
<mrvn> hardcoding a list of uarchs in the kernel to get the TLB sizes would be really bad.
<ddevault> shared with 4K
<ddevault> it can be fetched out of cpuid
<moon-child> mrvn: would it
<moon-child> you can have a reasonable fallback obviously
<mrvn> and if you are really good you mix 1G and 2M pages to use all the TLB slots, assuming they are independent on that uarch.
<ddevault> what use is a 1G page if you aren't going to fill it, you just going to randomly map 1G to fulfill a process's request for a couple megs?
<ddevault> transparent large/huge pages is (probably) a good idea though
Burgundy has joined #osdev
GeDaMo has joined #osdev
nyah has joined #osdev
slidercrank has quit [Ping timeout: 252 seconds]
gog has joined #osdev
<mrvn> ddevault: a 1G page has a faster page table walk. So even if you only need 4k it will fill the TLB faster than 2M or 4k. A 1G page is only bad if it means more evictions in the TLB.
<ddevault> perhaps, but you're mapping 1G into userspace even if they aren't going to use it
<mrvn> who says it's mapping into user space?
<ddevault> they can wantonly overwrite their desired allocation and you'd have to check the access bits if you want to split it up
<ddevault> ah, well.
<mrvn> The most likely use for 1G pages is to map the phys memory
<ddevault> sure
<ddevault> I use them for that purpose
<mrvn> But hey, if userspace allocates 1GB and you have a 1G page to map then why not?
<ddevault> oh for sure
bas1l is now known as basil
<ddevault> something something overcommit
<ddevault> but screw overcommit tbh
<mrvn> ddevault: rounding error if you have 1TB ram
<mrvn> You won't have a free 1GB page to map if you are running out of memory.
<mrvn> You might want to add some code to the swapping out to a) split a 1GB/2M pages into 4k chunks and b) eliminate 4k pages that are all zero.
<mrvn> Some people like to compress their swap, in which case you can easily check for zero pages while compressing.
slidercrank has joined #osdev
dh` has quit [Ping timeout: 276 seconds]
bauen1 has quit [Ping timeout: 276 seconds]
bnchs has joined #osdev
jjuran has quit [Quit: Killing Colloquy first, before it kills me…]
jjuran has joined #osdev
<gog> hi
<gog> i hate azure api
wlemuel has quit [Ping timeout: 240 seconds]
wlemuel has joined #osdev
<sham1> s/ api//
<sham1> FIFY
<gog> true
xenos1984 has quit [Quit: Leaving.]
<Ermine> hi gog, may I pet you instead
<gog> yes
* bnchs pets gog instead
* gog prr
theboringkid has joined #osdev
pmaz has quit [Quit: Konversation terminated!]
xenos1984 has joined #osdev
bauen1 has joined #osdev
bnchs has quit [Remote host closed the connection]
osmten has quit [Ping timeout: 245 seconds]
Left_Turn has joined #osdev
theboringkid has quit [Ping timeout: 252 seconds]
Brnocrist has quit [Read error: Connection reset by peer]
Brnocrist has joined #osdev
CalculusCats is now known as CalculusCat
terrorjack has quit [Quit: The Lounge - https://thelounge.chat]
terrorjack has joined #osdev
danilogondolfo has joined #osdev
Brnocrist has quit [Ping timeout: 248 seconds]
<ddevault> erp, there are fewer large pages to go around than I thought
* ddevault back to square 1
<Mutabah> ddevault: in the TLB?
<ddevault> in general
<ddevault> 4096 on an 8 GiB system
<Mutabah> Oh, just pure address-space/memory usage?
<ddevault> yeah
<mrvn> ddevault: how do you only get 50% memory with 1G pages?
<ddevault> hm?
<Mutabah> page sizes are 4K, 2M, 1G
<ddevault> yes?
<Mutabah> so there'd be 8196 in a 8GB system
<mrvn> An 8 GiB system only has 8 1G pages.
<Mutabah> (ignore bad maths)
<ddevault> ah right
<mrvn> sorry about the 50%. Thought you were talking 1G pages.
<Mutabah> oh... right, I can't maths either
<Mutabah> I blame it being nearly 10PM, 8192 1MB pages on a 8GB system
<mrvn> For 1G pages for user space you really have to get to those 512GiB servers.
<ddevault> new approach to memory management
<ddevault> move a lot of the work into userspace, in sysinit, set up a memory manager service with per-process accounts
<ddevault> and put more policy into the memory manager, to do things like lazy mapping, swap, etc
<mrvn> screw sysinit. Boot your single compute application as kernel.
<ddevault> and move page capabilities etc into a per-account cspace
<ddevault> then tearing down a process is just deleting the cspace for its account, one syscall
Brnocrist has joined #osdev
theboringkid has joined #osdev
CalculusCat is now known as CalculusCats
Brnocrist has quit [Read error: Connection reset by peer]
[itchyjunk] has joined #osdev
bauen1 has quit [Ping timeout: 255 seconds]
bauen1 has joined #osdev
<gog> all applications should be hypervised guest systems
<gog> exokernel time
<zid> hyperdocker
Brnocrist has joined #osdev
<gog> yes
<gog> wait no i hate docker
<moon-child> kuuuuuuuuuuuuuuuuuuuubernetes
theboringkid has quit [Ping timeout: 246 seconds]
<gog> y'all it's fucken snowing
<gog> kill me
<lav> o: snow
theboringkid has joined #osdev
<gog> :(
<gog> it's not gonna stick or accumulate or anything
<gog> i just don't want to see it
theboringkid has quit [Client Quit]
<GeDaMo> Close your eyes! :P
<lav> :(
dude12312414 has joined #osdev
Brnocrist has quit [Read error: Connection reset by peer]
<Bitweasil> gog, isn't that just Qubes? :p
Brnocrist has joined #osdev
heat has joined #osdev
<heat> gcc 13 out!!!!!!!!!!!!!!!!!!
<GeDaMo> godbolt has 13.1
Brnocrist has quit [Read error: Connection reset by peer]
<heat> yes, they didn't release a 13.0, its just 13.1
<nortti> huh, why?
<heat> I don't know. I think they call the development tree gcc 13.0, then the first stable release is 13.1
slidercrank has quit [Ping timeout: 240 seconds]
<heat> lots of toolchain work for me these next few days. I need gcc 13 and llvm 16
<heat> especially for C++. gcc 13 finally got <format>, llvm 16 got <source_location>
<heat> none of them have <print> yet which is my dream interface for printing
<bslsk05> ​en.cppreference.com: Standard library header <print> (C++23) - cppreference.com
<sham1> Those don't seem like the kind of stuff one can feasibly implement in userland. Shame
<sham1> If you need compiler support anyway, you might as well as proper interpolation IMO
<heat> oh, you totally get
<heat> can*
Brnocrist has joined #osdev
<heat> <format> and <print> have been in fmt since forever
<heat> <source_location> did in fact need compiler support though, the current facilities for getting the current line, etc don't really work well with it
<sham1> Oh yeah, forgot about fmt
<sham1> I suppose that the compiler support would really only be validation and checking that your template string is sane
Brnocrist has quit [Read error: Connection reset by peer]
<heat> no, i'm pretty sure that's all done through compile time template garbage
<heat> hence why C++ standard library headers take fun amounts of time to parse and compile :)
<Ermine> what good is print? looks like printf with blackjack and hookers
<GeDaMo> But templates! :P
<heat> it is printf with blackjack and hookers
<heat> and this time, no fucky specifiers, and no unsafeness, and AFAIK possibility to add your custom print code
Brnocrist has joined #osdev
<pitust> heat: some printfs let you add custom formatters
<pitust> and since the only printf anyone cares about is the gnu one, all of them support it
<heat> wrong
<heat> musl doesn't because <vague philosophical reasons>
xenos1984 has quit [Read error: Connection reset by peer]
<pitust> the solution is simple
<heat> use glibc? in progress
<pitust> just ignore musl
<pitust> whats musli
<heat> yes, shame its my OS's libc
<pitust> the solution is simple
<pitust> rm -rf / && curl https://debian.org/rootfs.tar.gz | tar -xzvC /
<bslsk05> ​debian.org: Debian -- Page not found
<heat> would rather drink bleach than use debian
<gog> bleach smells great and tastses amazing
<heat> gog your website's links are all broken
<heat> https://adachristine.is/gay dont work anymore :(
<bslsk05> ​adachristine.is <no title>
<gog> oh yeah
<gog> i didn't fix those
<gog> i'm totally rewriting my layout page anyway
<moon-child> oh no
<moon-child> now how will I know if ada christine is gay?
<heat> gog, u gay or what
<moon-child> btw, fun benchmark
<moon-child> make a bunch of mutexes
<moon-child> for every mutex, make a thread that repeatedly acquires and releases it
<moon-child> and then make the main thread repeatedly go through and for each mutex acquire and release it
<moon-child> some shitty mutex impl on my laptop runs 100x slower than desktop
<moon-child> with like 8 mutexes
<gog> heat: i'm just generally queer
gildasio2 has quit [Remote host closed the connection]
<heat> ok there u go, slightly slower than an HTTP GET but what can you do
<gog> HTTP GAY
gildasio2 has joined #osdev
xenos1984 has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
xenos1984 has quit [Ping timeout: 240 seconds]
xenos1984 has joined #osdev
<Ermine> HTTP bi.0 when
<Ermine> btw
* Ermine pets gog
<Ermine> I felt asleep back then
gog has quit [Quit: Konversation terminated!]
<Ermine> site name just overflows a bit
nvmd has joined #osdev
gxt__ has quit [Ping timeout: 240 seconds]
Brain___ has joined #osdev
gxt__ has joined #osdev
xenos1984 has quit [Ping timeout: 260 seconds]
<Ermine> Ah, I'm doing it wrong
<Ermine> RFC 1149-compaint channels
xenos1984 has joined #osdev
dude12312414 has joined #osdev
gog has joined #osdev
plarke has joined #osdev
slidercrank has joined #osdev
wootehfoot has joined #osdev
dude12312414 has quit [Quit: THE RAM IS TOO DAMN HIGH]
arminweigl has quit [Ping timeout: 248 seconds]
arminweigl_ has joined #osdev
arminweigl_ is now known as arminweigl
archpc has quit [Quit: killall irc]
archpc has joined #osdev
elastic_dog has quit [Read error: Connection reset by peer]
elastic_dog has joined #osdev
Brnocrist has quit [Ping timeout: 255 seconds]
Brnocrist has joined #osdev
archpc has quit [Quit: killall irc]
awita has joined #osdev
plarke has quit [Ping timeout: 250 seconds]
wootehfoot has quit [Read error: Connection reset by peer]
heat has quit [Read error: Connection reset by peer]
heat has joined #osdev
bauen1 has quit [Ping timeout: 255 seconds]
TkTech has joined #osdev
bgs has quit [Remote host closed the connection]
<heat> moon-child, btw that's a weird benchmark
<heat> what are you trying to achieve there?
TkTech has quit [Quit: The Lounge - https://thelounge.chat]
TkTech has joined #osdev
<moon-child> wanted a low effort way to demonstrate that my thing is clearly better than the existing thing, by virtue of not being absurd
<moon-child> hammering just one mutex gave somewhat strange results, and I suspect I know why
<moon-child> one thing I don't get is that the timing seems to be super bimodal, everywhere I've tested this. Shouldn't be numa, and two of the machines had a lot more cores than threads, so scheduler seems unlikely
<moon-child> oh maybe collision in the hash table or something
Jari-- has joined #osdev
danilogondolfo has quit [Remote host closed the connection]
GeDaMo has quit [Quit: That's it, you people have stood in my way long enough! I'm going to clown college!]
<mrvn> moon-child: is the mutex >= cache line size?
<mrvn> might be false sharing of the cache line
<mrvn> also are you using lock or try_lock?
bauen1 has joined #osdev
<Jari--> I got 2,500 EUR donation on my open source projects
<Jari--> happy
<heat> what
<heat> u get paid??
<Jari--> heat, and I joined #hamradio
<heat> motherfuckers I take paypal, bank transfer, may open a patreon, onlyfans or fansly upon request
<zid> His mother just happens to love him heat
<heat> i can make vids doing hot steamy kernel development
<sham1> Hot tub programming streams on Twitch
innegatives has joined #osdev
<zid> heat trying to sell out, typical
<zid> what happened to glorious oss communism
<sham1> It's actually incredible how many loopholes twitch adds for the whole "no nudity"-rule
<zid> he hears about someone *else* getting paid and suddenly he's in a hot tub
<sham1> Like yeah, it brings money, but some of these workarounds are just silly. Just allow nudity and such and be done with it
<zid> It's mainly credit card processors that stop you doing that sham
<innegatives> Say you've got INC instruction with mod of 01 (1 displacement byte) and r/m of 000 (base register BX, index register SI), does that meanto find the offset you add "BX + SI + displacement"?
<innegatives> s/meanto/mean to/
<zid> innegatives: You know assemblers and disassemblers exist right?
<zid> You can just verify this against them
<innegatives> its hard
<sham1> zid: right, and IMO that's BS. I understand that payment processors have rules but jeez
<heat> it's not hard dude
<heat> you have a fucking 8086 under your desk
<innegatives> How do I find out what offset it calculated tho after running it?
<zid> innegatives: give me an instruction to decode
<innegatives> ok
<innegatives> wait
<sham1> Like, that somewhat infamously lead to PH removing like all non-big producer content for a while
<zid> sham1: onlyfans had to threaten to remove adult content at one point
<zid> *onlyfans*
<innegatives> 1111,1111,0100,0000,0101,1100
<sham1> Credit card companies are the best worst thing. The problem is that the alternative is even more terrible
<zid> It would have just been my parody account left that has pictures of 120mm cooling solutions left
<zid> FF 40 ..
<heat> hi sham1 have you heard about cryptocurrencies?
<zid> 5c
<innegatives> we are talking in binary and hex from now on
<heat> i have invented a new coin, pessimalcoin
<zid> inc [A+0x5c]
<heat> please buy it (from me)
<zid> that was hard.
<innegatives> dude i know the instruction
<innegatives> I'm trying to find out how offset is calculated
<zid> You told me me doing that was 'too hard'
<sham1> The problem is that the alternative is even more terrible. I actually referred to crypto
<heat> do u want onyx nfts
<innegatives> What's A?
<zid> The register A
<zid> ax/eax/rax
<zid> depends on cpu mode
<zid> There's some vague encoding differences between 8086 and modern cpus though, and I was too lazy to dig out a real 8086 disassembler though
<heat> i hope you understand what inc [ax + 0x5c] means
eroux has quit [Quit: Textual IRC Client: www.textualapp.com]
<innegatives> i do but something's not correct
<heat> or inc 0x5c(%ax) if you're cool
<innegatives> r/m of 000 means BX base regsiter and SI index register to calculate the offset
CalculusCats is now known as CalculusCat
<zid> oh right
<zid> 0: 67 66 ff 40 04 inc WORD PTR [bx+si+0x4]
<zid> this is one of the ones that changes meaning
<heat> wtf zid
<zid> without the prefix spam it's A reg
<zid> with it it turns into the magic real mode bx+si thing
<heat> x86 is fucking great
<innegatives> wait dude, there's still an issue
<innegatives> where DS comes in?
<zid> DS is implicit
<innegatives> Oh
<zid> for accesses to memory via []
<zid> ss is implicit for stack ops
<innegatives> Right, thanks
<zid> cs is implicit for jumps/calls/etc
<zid> you can override it with a prefix byte
<innegatives> If BP is used for calculating offset then its stack segment that's used
xenos1984 has quit [Read error: Connection reset by peer]
<heat> last I checked, EFI firmware did lgdt cs:gdtr to load a gdt
<heat> segments are fun
<heat> that is, in the waking vector
<innegatives> zid: something's still off, displacement is 0101,1100, where did 0x4 come from?
<zid> it's 5c
<zid> I disassembled 4 for pmode to show the fact it was different
<zid> inc word ptr es:[si] / inc word ptr ds:[si] / inc word ptr [si]
<zid> 0: 26 67 66 ff 04 inc WORD PTR es:[si]
<zid> 5: 67 66 ff 04 inc WORD PTR [si]
<zid> 9: 67 66 ff 04 inc WORD PTR [si]
<zid> ds is implicit, so last two are just identical, 26 overrides for es
sortie has quit [Ping timeout: 255 seconds]
<innegatives> ah shit
<heat> does anyone want to buy my bath water
<zid> the 67 66 crap is because I disassembled for pmode not real mode
<heat> trick question, i'm an irc user, I don't take baths
<kof123> is baby included?
<zid> cus I only have a pmode disassembler in my immediate arm's reach
<kof123> asking for a friend
CalculusCat is now known as CalculusCats
<zid> ndisasm -b16 should probably work fine for you
<innegatives> can I just use Keystone in Rust?
<klange> `objdump -M i8086`?
eroux has joined #osdev
<zid> no idea if you can use keystone from rust
<zid> or if capstone even supports real mode tbh
<zid> I *know* nasm does, and it's trivial
<innegatives> How do I input binary directly to ndisasm -b16?
<zid> echo?
<innegatives> echo '11110000' > ?
<zid> surely it's easier to type into your shell
<innegatives> isnt that ascii?
<zid> than onto irc and wait for a response
<zid> echo -e "\x66\x5C" > file.bin; ndisasm -b16 file.bin
<zid> or whatever
<zid> use python or a language with binary literals or whatver for the echo if you really want
<heat> yeah this is trivially scriptable
<heat> back when I wrote my bpf x86 jitter I just wrote to a file and then verified the results with objdump
<zid> you mean you didn't copy paste your output to irc then ask if it looks right!?
<heat> i think I did that once or twice as a venting mechanism
<zid> ek
<zid> kek
<heat> because x86 insn encoding sucks major balls
<heat> you can't even consistently encode things because of the 30000000000 special cases
<heat> fuck that, really
<zid> encoding it is worse than decoding it, imo
<zid> decoding it is the same as basically anything else that isn't hugely orthogonal
<zid> and mod r/m makes it actually fairly orthogonal
<heat> i still don't fully understand how modrm works
<zid> ?
<heat> iirc the format was not really consistent between instructions
<zid> You just break it into fields and go left to right listening to what it tells you
<zid> it is
<innegatives> heat: best book for that is 8086/8088 primer (i uploaded it to libgen)
<heat> i think "src" and "dst" were swapped in modrm quite a few times? something like that
<zid> ah maybe
<zid> but intel tells you in their awful cryuptic language what to do
<zid> f4/i82a48
<zid> looks like a cpu model
<zid> "use modrm where the i field is set to 82 and a field is inverted twice and xor'd with 48"
<zid> or whatever
<heat> there was also the funny problem with fucking rbp based addressing
xenos1984 has joined #osdev
<heat> seriously, fuck all the x86 instructions, really
<zid> yea ebp is the 'escape' for mod/rm
<heat> hacky ass depressing ass architecture
<zid> if you try to encode ebp via its reg number you instead get the extended field variant or whatever instead
<zid> The table in the manual is very good though
<moon-child> heat: it depends on the instruction
<moon-child> because some can have memory sources and some have memory destinations
<moon-child> so the modr/m doesn't have a source and a dest; it has a register and a register/memory
<zid> nod
<moon-child> and the instruction decides which of those is the source and which is the dest
<zid> so you sometimes need to switch what you "think" it does, to make it do what it obviously should do
<zid> if you're thinking in terms of src/dst
<nortti> doesn't the lowest? second-lowest? bit usually let you switch between the two?
<nortti> of the initial byte
<bslsk05> ​www.sandpile.org: sandpile.org -- x86 architecture -- mod R/M byte
<heat> you know at some point I just started playing around with godbolt asm and the opcodes it shits out, it was more useful than reading the SDM really
<zid> It's not too hard to understand if you have the table, and a couple of instructions to reference
<zid> figuring it out with just one or the other is hard
<heat> maybe I went about it the wrong way
<moon-child> I found the sdm super confusing
<zid> see how it goes ax cx dx bx sib * si di? sp/bp are the regs that go in the sib and * slots
<zid> if you go by reg number
<zid> afaik
<zid> so you need extended encodings for them
<zid> but the sp one is just the displacement form I think so that works out "how you want it except [sp] has to be [sp+0]" or something
<zid> man this is crusty memory
<zid> but afaik some things have a direct [sp] encoding by not using modrm at all
<zid> so whatever
foudfou has quit [Remote host closed the connection]
foudfou has joined #osdev
sortie has joined #osdev
<moon-child> you mean like push?
wlemuel has quit [Quit: Ping timeout (120 seconds)]
wlemuel has joined #osdev
<Brain___> im in need of a name for the irc client im making for my OS
<Brain___> please highlight me if you have any good ideas, the OS is called 'retro rocket' and its userland is all written in BASIC, so that might help give some inspiration as to naming. naming things is hard.
<Jari--> locking symbols of resources at the moment, no time to find the locked resources, there are like 10 000 structures
<zid> dogcock
<zid> oh wait no I mean, red rocket
<Brain___> lmao, dogcock?
<zid> sorry typo
<sortie> Brain___, haha I just called mine irc(1)
<Brain___> dont remind me, we have two dogs male and female and just went through her being in season, jesus christ too much dog cock to handle, cannot unsee
<Brain___> sortie: yeah thats what the command is called, and it'll still be called that no matter what i put in the title bar
<Brain___> because then people actually know what its for without going "oojimaflop? whats that for?"
<zid> "Retro Rocket IRC Client" then if you just want a titlebar name
<zid> and not an executable name
<zid> boring and functional yay
<Brain___> you think someone who's NIH'ing the entire ecosystem goes for boring and functional? :D
<zid> only by necessity
<zid> too many things to do and name to not
<Brain___> this is true
<Brain___> i ended up just calling my editor edit
<zid> EDIT.COM
<zid> Timeless.
<Brain___> lol, no just edit :D
<zid> If you need a name for your debugger, pick me
<zid> I have the best name for it
<Brain___> but its basically similar, somewhere between that and nano
<Brain___> zid, de buggery?
<Brain___> lmao
<bslsk05> ​github.com: retro-rocket/edit.rrbasic at master · brainboxdotcc/retro-rocket · GitHub
<Brain___> this is what the source looks like for the user programs
<Brain___> unfortunately looks a bit more ugly in github, because github doesnt know how to syntax highlight it, i had to make my own vscode plugin for that
<zid> When standard defines for keys
<Brain___> there are, just they arent exposed to BASIC
<Brain___> not yet anyway
<Brain___> i found lots of other little glitches in my attempt to write bigger more useful programs in the language, that i need to fix before that :D
<Brain___> like, if you are in a procedure (PROC) and you then enter a loop (FOR/REPEAT) you lose visibility of local parameter variables *facepalm*
<Brain___> which is why im making copies as workarounds
<Brain___> i should probably create github issues so i dont forget these
<Brain___> another one is i really really need some kind of block IF/THEN/ELSE
<Brain___> complex logic sucks ass without it
slidercrank has quit [Ping timeout: 248 seconds]
innegatives has quit [Quit: WeeChat 3.8]
Burgundy has quit [Ping timeout: 255 seconds]
nyah has quit [Quit: leaving]
Left_Turn has quit [Read error: Connection reset by peer]
awita has quit [Remote host closed the connection]
sortie has quit [Ping timeout: 240 seconds]
tiggster has joined #osdev
Jari-- has quit [Ping timeout: 255 seconds]
sortie has joined #osdev
dutch has quit [Quit: WeeChat 3.7.1]
dutch has joined #osdev
<mrvn> did someone mention yet that x86 is a horrible mess?
<mrvn> Brain___: if then else end? Or how do you deal with nested ifs? "else pass"?
<tiggster> mrvn, but its the most widely documented. :)
nvmd has quit [Ping timeout: 255 seconds]
<mrvn> tiggster: every cpu you can easily buy is documented extensively.
<mrvn> Brain___: or is there BEGIN ... END to make a block?
<mrvn> oehm, string variables must end with "$" and then () is index access? Otherwise it's a function call?
<klange> It's not that "x86" is "widely documented" it's that the "PC platform" is.
tiggster has quit [Remote host closed the connection]
Matt|home has joined #osdev