X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=lugburz;a=blobdiff_plain;f=src%2Famiga%2Fmem.c;fp=src%2Famiga%2Fmem.c;h=2b82db3f7bc474306af45616c424597a671fdd7c;hp=0000000000000000000000000000000000000000;hb=d166ef254c06ffbf7e4bb0450bd7d52e5ea82b0f;hpb=515574f76f8442b756fbbf87b41e340d6a78bc42 diff --git a/src/amiga/mem.c b/src/amiga/mem.c new file mode 100644 index 0000000..2b82db3 --- /dev/null +++ b/src/amiga/mem.c @@ -0,0 +1,27 @@ +#include +#include "serial.h" +#include "mem.h" +#include "amigalib.h" + +int init_mem(void) +{ + struct alib_memnode *mem; + + printf("Memory ranges:\n"); + mem = execbase->memlist.head; + while(mem->n_next) { + char *stype; + if(mem->attrib & ALIB_MEMF_CHIP) { + stype = "chip"; + } else if(mem->attrib & ALIB_MEMF_FAST) { + stype = "fast"; + } else { + stype = "unknown"; + } + printf(" %06lx - %06lx: %s\n", (unsigned long)mem->start, + (unsigned long)mem->end, stype); + mem = mem->n_next; + } + + return 0; +}