The VM stores data in big endian format, so I'm tinkering around with libmach to see about how to convert that to native representations, regardless of compiler architecture.
This commit is contained in:
parent
6cfec8150d
commit
d0c9b8c4c4
7
main.c
7
main.c
|
@ -2,6 +2,8 @@
|
|||
#include <libc.h>
|
||||
#include <draw.h>
|
||||
#include <event.h>
|
||||
#include <bio.h>
|
||||
#include <mach.h>
|
||||
#include "graphics.h"
|
||||
|
||||
enum {
|
||||
|
@ -31,10 +33,13 @@ void changeState(void) {
|
|||
|
||||
void main(void)
|
||||
{
|
||||
ulong number = 0x01020304;
|
||||
ulong converted = beswal(number);
|
||||
print("%08ulx, %08ulx\n", number, converted);
|
||||
if(initdraw(nil, nil, "Another Plan") < 0) {
|
||||
sysfatal("initdraw failed: %r");
|
||||
}
|
||||
initGraphics();
|
||||
initGraphics();
|
||||
einit(Emouse | Ekeyboard);
|
||||
|
||||
int child = rfork(RFPROC|RFMEM);
|
||||
|
|
Loading…
Reference in New Issue