1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-12 02:30:44 +00:00

make it actually compile again :)

This commit is contained in:
mrdudz 2020-08-14 21:07:39 +02:00
parent f0e4053a0d
commit 8197e3c7cd

View File

@ -3,34 +3,25 @@
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include <_heap.h>
/* From _heap.h */
extern unsigned _horg; /* Bottom of heap */
extern unsigned _hptr; /* Current top */
extern unsigned _hend; /* Upper limit */
extern unsigned _hfirst; /* First free block in list */
extern unsigned _hlast; /* Last free block in list */
static unsigned char* V[256]; static unsigned char* V[256];
static void ShowInfo (void) static void ShowInfo (void)
/* Show heap info */ /* Show heap info */
{ {
/* Count free blocks */ /* Count free blocks */
unsigned Count = 0; unsigned Count = 0;
unsigned** P = (unsigned**) _hfirst; unsigned** P = (unsigned**) _heapfirst;
while (P) { while (P) {
++Count; ++Count;
P = P[1]; P = P[1];
} }
printf ("%04X %04X %04X %04X %04X %u\n", printf ("%04X %04X %04X %04X %04X %u\n",
_horg, _hptr, _hend, _hfirst, _hlast, Count); _heaporg, _heapptr, _heapend, _heapfirst, _heaplast, Count);
if (Count) { if (Count) {
P = (unsigned**) _hfirst; P = (unsigned**) _heapfirst;
while (P) { while (P) {
printf ("%04X %04X %04X %04X(%u)\n", printf ("%04X %04X %04X %04X(%u)\n",
(unsigned) P, P[2], P[1], P[0], P[0]); (unsigned) P, P[2], P[1], P[0], P[0]);