#mkOa

1 messages ยท Page 1 of 1 (latest)

severe blaze
#

Well time to put device drivers into the kernel ๐Ÿ”ฅ ๐Ÿ”ฅ ๐Ÿ”ฅ

#

Also for the sake of sanity this will be written only targetting em64t with 0 arch specific code separation.

#

Too much boilerplate I CBA to write on a phone.

glass vessel
#

were you going to try using the terminal app on the pixel? or was that giving issues

severe blaze
#

Ok I forgot header deps.

severe blaze
glass vessel
#

fair fair

neat apex
#

though sometimes youll get a java exception

#

then it wont work

severe blaze
#

The fact that this doesn't work ruined my day.

#
u0_a222@localhost ~> cat t.c

struct d {char d;};

int main() {
    int x = __builtin_offsetof(struct d, sizeof(d
                .
    d), d);
}
#

The second operand of offset of has to be a lone identifier...

#

Like it makes sense lol.

#

Still sad.

#

Logic does not make grief go away.

#

Man C IS PISSING ME OFF.

#

oops caps lock.

#

But I guess its accurate.

#

I got too acquainted with modern language features and syntax.

#

Especially syntax.

#

I was trying to figure out how to make a nice API for port I/O and realized C has no RHS type inferrrence based on the LHS.

#

Which may some weird but its one of the cool thing my language has, where you can write u8 x = my_template(); and (assuming the signature is T my_template(T)();) the compiler deduces T to be u8.

#

And I would like that for my port in function.

severe blaze
#

OK I give up on my stupid idea.

#

But I will explain it anyways, I wanted to make an API which would sort of look like a builder and take a base and offset via a struct.

#

in(0x3F8).iobase(serial_port, ier)

severe blaze
#

OK writing code on a phone is much more annoying that I expected it to be.

chrome narwhal
#

lol

severe blaze
#

Well stuff is going very slowly I will not lie but we got a super basic integrated serial driver and a hello world!

#

I did not wire up interrupts yet, might do that far far later.

#

That is not even a formatted printer BTW.

severe blaze
grand saffron
severe blaze
#

OK.

strange grove
#

Developed on a phone? Are you insane?

neat apex