1 register volatile int * IOSPACE
asm("$233");
3 void putch(long int ch
)
12 void puthex(long unsigned d
, long unsigned v
)
16 puthex(d
- 1, v
>> 4);
17 putch("0123456789abcdef"[v
& 15]);
26 register unsigned long g242
asm("$242");
27 register unsigned long g246
asm("$246");
28 register unsigned long g254
asm("$254");
30 void write(unsigned long seg
, unsigned long offset
, unsigned v
)
37 void check(unsigned long seg
, unsigned long offset
, unsigned v
)
41 if (*(unsigned *)seg
!= v
) {
45 puthex(8,*(unsigned *)seg
);
46 my_puts(" Bad! Expected ");
57 g241: 0000000000001a98 _global_impure_ptr = #1a98 (12)
58 g242: 2000000000000000 !!
59 g243: 2000000000001088 _impure_ptr
60 g244: 20000000000017a8 __malloc_av_
61 g245: 2000000000001fb8 __malloc_trim_threshold
62 g246: 4000000000000000 _Sbrk_high !!
70 g254: 6000000000000000 !!
71 g255: 0000000000000180 Main
74 IOSPACE
= (int*) 0x1000000000000ULL
;
78 unsigned long k
= 128;
81 g242
= 0x2000000000000000ULL
;
82 g246
= 0x4000000000000000ULL
;
83 g254
= 0x6000000000000000ULL
;
85 //fb = (unsigned char *) (256 * 1024);
89 my_puts("MMIX is **ALIVE**!!\n");
100 for (x
= 9000; x
< 256 * 1024; x
+= 8)
101 write(1, x
, 999 + (x
<< 2) + x
);
103 for (x
= 9000; x
< 256 * 1024; x
+= 8)
104 check(1, x
, 999 + (x
<< 2) + x
);