Problem with zxn_addr_from_mmu() in zxn.h

ZX80, ZX 81, ZX Spectrum, TS2068 and other clones
Post Reply
Stefan123
Member
Posts: 85
Joined: Fri Oct 21, 2016 7:57 am

Problem with zxn_addr_from_mmu() in zxn.h

Post by Stefan123 »

I'm trying to use zxn_addr_from_mmu() in zxn.h but get the following errors:

SCCZ80: Error at file 'test.c' line XXX: symbol 'zxn_addr_from_mmu' not defined.

SDCC: Error at file 'test.c' line XXX: integer '130' out of range.
alvin
Well known member
Posts: 1872
Joined: Mon Jul 16, 2007 7:39 pm

Post by alvin »

The sdcc compile works for me:

Code: Select all

#include <stdio.h>
#include <arch/zxn.h>

void main(void)
{
        printf("MMU 6 starts from address 0x%04x\n", zxn_addr_from_mmu(6));
}
zcc +zxn -vn -startup=4 -clib=sdcc_iy -SO3 --max-allocs-per-node200000 zzz.c -o zzz -create-app

sccz80 was broken but I've fixed it now:
https://github.com/z88dk/z88dk/commit/8 ... 8fc8c4014e

zcc +zxn -vn -startup=4 -clib=new zzz.c -o zzz -create-app
Post Reply