From 797ecf9bc0df8b9f1a68cbf049fbcf22447cbaa2 Mon Sep 17 00:00:00 2001 From: Jose Rodriguez Date: Tue, 18 Aug 2020 21:34:14 +0200 Subject: [PATCH 1/3] Move library and library-asm to arch/zx48k Big change here! This one allows setting architecture (--arch=zx48k, which is the default) and the includes used will be the one there. --- api/config.py | 1 + arch/__init__.py | 4 ++- .../zx48k/library-asm}/SP/CharLeft.asm | 0 .../zx48k/library-asm}/SP/CharRight.asm | 0 .../zx48k/library-asm}/SP/GetScrnAddr.asm | 0 .../zx48k/library-asm}/SP/PixelDown.asm | 0 .../zx48k/library-asm}/SP/PixelLeft.asm | 0 .../zx48k/library-asm}/SP/PixelRight.asm | 0 .../zx48k/library-asm}/SP/PixelUp.asm | 0 .../zx48k/library-asm}/_mul32.asm | 0 .../zx48k/library-asm}/abs16.asm | 0 .../zx48k/library-asm}/abs32.asm | 0 .../zx48k/library-asm}/abs8.asm | 0 .../zx48k/library-asm}/absf.asm | 0 .../zx48k/library-asm}/acos.asm | 0 .../zx48k/library-asm}/addf.asm | 0 .../zx48k/library-asm}/alloc.asm | 0 .../zx48k/library-asm}/and16.asm | 0 .../zx48k/library-asm}/and32.asm | 0 .../zx48k/library-asm}/and8.asm | 0 .../zx48k/library-asm}/andf.asm | 0 .../zx48k/library-asm}/array.asm | 0 .../zx48k/library-asm}/arrayalloc.asm | 0 .../zx48k/library-asm}/arraystrfree.asm | 0 .../zx48k/library-asm}/asc.asm | 0 .../zx48k/library-asm}/asin.asm | 0 .../zx48k/library-asm}/atan.asm | 0 .../zx48k/library-asm}/attr.asm | 0 .../zx48k/library-asm}/band16.asm | 0 .../zx48k/library-asm}/band32.asm | 0 .../zx48k/library-asm}/beep.asm | 0 .../zx48k/library-asm}/beeper.asm | 0 .../zx48k/library-asm}/bnot16.asm | 0 .../zx48k/library-asm}/bnot32.asm | 0 .../zx48k/library-asm}/bold.asm | 0 .../zx48k/library-asm}/bor16.asm | 0 .../zx48k/library-asm}/bor32.asm | 0 .../zx48k/library-asm}/border.asm | 0 .../zx48k/library-asm}/bound.asm | 0 .../zx48k/library-asm}/break.asm | 0 .../zx48k/library-asm}/bright.asm | 0 .../zx48k/library-asm}/bxor16.asm | 0 .../zx48k/library-asm}/bxor32.asm | 0 .../zx48k/library-asm}/calloc.asm | 0 .../zx48k/library-asm}/chr.asm | 0 .../zx48k/library-asm}/circle.asm | 0 .../zx48k/library-asm}/cls.asm | 0 .../zx48k/library-asm}/const.asm | 0 .../zx48k/library-asm}/copy_attr.asm | 0 .../zx48k/library-asm}/cos.asm | 0 .../zx48k/library-asm}/div16.asm | 0 .../zx48k/library-asm}/div32.asm | 0 .../zx48k/library-asm}/div8.asm | 0 .../zx48k/library-asm}/divf.asm | 0 .../zx48k/library-asm}/divf16.asm | 0 .../zx48k/library-asm}/draw.asm | 0 .../zx48k/library-asm}/draw3.asm | 0 .../zx48k/library-asm}/eq16.asm | 0 .../zx48k/library-asm}/eq32.asm | 0 .../zx48k/library-asm}/eqf.asm | 0 .../zx48k/library-asm}/error.asm | 0 .../zx48k/library-asm}/exp.asm | 0 .../zx48k/library-asm}/f16tofreg.asm | 0 .../zx48k/library-asm}/flash.asm | 0 .../zx48k/library-asm}/free.asm | 0 .../zx48k/library-asm}/ftof16reg.asm | 0 .../zx48k/library-asm}/ftou32reg.asm | 0 .../zx48k/library-asm}/gef.asm | 0 .../zx48k/library-asm}/gtf.asm | 0 .../zx48k/library-asm}/heapinit.asm | 0 .../zx48k/library-asm}/iload32.asm | 0 .../zx48k/library-asm}/iloadf.asm | 0 .../zx48k/library-asm}/in_screen.asm | 0 .../zx48k/library-asm}/ink.asm | 0 .../zx48k/library-asm}/inkey.asm | 0 .../zx48k/library-asm}/inverse.asm | 0 .../zx48k/library-asm}/istore16.asm | 0 .../zx48k/library-asm}/italic.asm | 0 .../zx48k/library-asm}/lddede.asm | 0 .../zx48k/library-asm}/lef.asm | 0 .../zx48k/library-asm}/lei16.asm | 0 .../zx48k/library-asm}/lei32.asm | 0 .../zx48k/library-asm}/lei8.asm | 0 .../zx48k/library-asm}/letsubstr.asm | 0 .../zx48k/library-asm}/load.asm | 0 .../zx48k/library-asm}/loadstr.asm | 0 .../zx48k/library-asm}/logn.asm | 0 .../zx48k/library-asm}/ltf.asm | 0 .../zx48k/library-asm}/lti16.asm | 0 .../zx48k/library-asm}/lti32.asm | 0 .../zx48k/library-asm}/lti8.asm | 0 .../zx48k/library-asm}/memcopy.asm | 0 .../zx48k/library-asm}/modf.asm | 0 .../zx48k/library-asm}/modf16.asm | 0 .../zx48k/library-asm}/mul16.asm | 0 .../zx48k/library-asm}/mul32.asm | 0 .../zx48k/library-asm}/mul8.asm | 0 .../zx48k/library-asm}/mulf.asm | 0 .../zx48k/library-asm}/mulf16.asm | 0 .../zx48k/library-asm}/nef.asm | 0 .../zx48k/library-asm}/neg16.asm | 0 .../zx48k/library-asm}/neg32.asm | 0 .../zx48k/library-asm}/negf.asm | 0 .../zx48k/library-asm}/not32.asm | 0 .../zx48k/library-asm}/notf.asm | 0 .../zx48k/library-asm}/ongoto.asm | 0 .../zx48k/library-asm}/or32.asm | 0 .../zx48k/library-asm}/orf.asm | 0 .../zx48k/library-asm}/over.asm | 0 .../zx48k/library-asm}/paper.asm | 0 .../zx48k/library-asm}/pause.asm | 0 .../zx48k/library-asm}/pistore32.asm | 0 .../zx48k/library-asm}/ploadf.asm | 0 .../zx48k/library-asm}/plot.asm | 0 .../zx48k/library-asm}/pow.asm | 0 .../zx48k/library-asm}/print.asm | 0 .../zx48k/library-asm}/print_eol_attr.asm | 0 .../zx48k/library-asm}/printf.asm | 0 .../zx48k/library-asm}/printf16.asm | 0 .../zx48k/library-asm}/printi16.asm | 0 .../zx48k/library-asm}/printi32.asm | 0 .../zx48k/library-asm}/printi8.asm | 0 .../zx48k/library-asm}/printnum.asm | 0 .../zx48k/library-asm}/printstr.asm | 0 .../zx48k/library-asm}/printu16.asm | 0 .../zx48k/library-asm}/printu32.asm | 0 .../zx48k/library-asm}/printu8.asm | 0 .../zx48k/library-asm}/pstore32.asm | 0 .../zx48k/library-asm}/pstoref.asm | 0 .../zx48k/library-asm}/pstorestr.asm | 0 .../zx48k/library-asm}/pstorestr2.asm | 0 .../zx48k/library-asm}/pushf.asm | 0 .../zx48k/library-asm}/random.asm | 0 .../zx48k/library-asm}/read_restore.asm | 0 .../zx48k/library-asm}/realloc.asm | 0 .../zx48k/library-asm}/save.asm | 0 .../zx48k/library-asm}/sgn.asm | 0 .../zx48k/library-asm}/sgnf.asm | 0 .../zx48k/library-asm}/sgnf16.asm | 0 .../zx48k/library-asm}/sgni16.asm | 0 .../zx48k/library-asm}/sgni32.asm | 0 .../zx48k/library-asm}/sgni8.asm | 0 .../zx48k/library-asm}/sgnu16.asm | 0 .../zx48k/library-asm}/sgnu32.asm | 0 .../zx48k/library-asm}/sgnu8.asm | 0 .../zx48k/library-asm}/shl32.asm | 0 .../zx48k/library-asm}/shra32.asm | 0 .../zx48k/library-asm}/shrl32.asm | 0 .../zx48k/library-asm}/sin.asm | 0 .../zx48k/library-asm}/spectranet.inc | 0 .../zx48k/library-asm}/sposn.asm | 0 .../zx48k/library-asm}/sqrt.asm | 0 .../zx48k/library-asm}/stackf.asm | 0 .../zx48k/library-asm}/store32.asm | 0 .../zx48k/library-asm}/storef.asm | 0 .../zx48k/library-asm}/storestr.asm | 0 .../zx48k/library-asm}/storestr2.asm | 0 .../zx48k/library-asm}/str.asm | 0 .../zx48k/library-asm}/strarraycpy.asm | 0 .../zx48k/library-asm}/strcat.asm | 0 .../zx48k/library-asm}/strcpy.asm | 0 .../zx48k/library-asm}/strictbool.asm | 0 .../zx48k/library-asm}/string.asm | 0 .../zx48k/library-asm}/strlen.asm | 0 .../zx48k/library-asm}/strslice.asm | 0 .../zx48k/library-asm}/sub32.asm | 0 .../zx48k/library-asm}/subf.asm | 0 .../zx48k/library-asm}/swap32.asm | 0 .../zx48k/library-asm}/table_jump.asm | 0 .../zx48k/library-asm}/tan.asm | 0 .../zx48k/library-asm}/u32tofreg.asm | 0 .../zx48k/library-asm}/usr.asm | 0 .../zx48k/library-asm}/usr_str.asm | 0 .../zx48k/library-asm}/val.asm | 0 .../zx48k/library-asm}/xor16.asm | 0 .../zx48k/library-asm}/xor32.asm | 0 .../zx48k/library-asm}/xor8.asm | 0 .../zx48k/library-asm}/xorf.asm | 0 {library => arch/zx48k/library}/README | 0 {library => arch/zx48k/library}/SP/Fill.bas | 0 {library => arch/zx48k/library}/alloc.bas | 0 {library => arch/zx48k/library}/asc.bas | 0 {library => arch/zx48k/library}/attr.bas | 0 {library => arch/zx48k/library}/basic.bas | 0 {library => arch/zx48k/library}/csrlin.bas | 0 {library => arch/zx48k/library}/esxdos.bas | 0 {library => arch/zx48k/library}/fastplot.bas | 0 {library => arch/zx48k/library}/haplofnt.bin | Bin {library => arch/zx48k/library}/hex.bas | 0 {library => arch/zx48k/library}/input.bas | 0 {library => arch/zx48k/library}/input42.bas | 0 {library => arch/zx48k/library}/keys.bas | 0 {library => arch/zx48k/library}/lcase.bas | 0 {library => arch/zx48k/library}/megalz.bas | 0 {library => arch/zx48k/library}/memcopy.bas | 0 .../zx48k/library}/mj/fourspriter.bas | 0 {library => arch/zx48k/library}/point.bas | 0 {library => arch/zx48k/library}/pos.bas | 0 {library => arch/zx48k/library}/print42.bas | 0 {library => arch/zx48k/library}/print64.bas | 0 {library => arch/zx48k/library}/printfzx.bas | 0 {library => arch/zx48k/library}/radastan.bas | 0 {library => arch/zx48k/library}/retrace.bas | 0 {library => arch/zx48k/library}/screen.bas | 0 {library => arch/zx48k/library}/scroll.bas | 0 {library => arch/zx48k/library}/sinclair.bas | 0 .../zx48k/library}/spectranet.bas | 0 {library => arch/zx48k/library}/string.bas | 0 {library => arch/zx48k/library}/template.bas | 0 {library => arch/zx48k/library}/ucase.bas | 0 {library => arch/zx48k/library}/winscroll.bas | 0 .../zx48k/library}/zxuno/uart.bas | 0 libzxbc/zxb.py | 8 +++++ libzxbpp/zxbpp.py | 31 ++++++++++++++---- 214 files changed, 37 insertions(+), 7 deletions(-) rename {library-asm => arch/zx48k/library-asm}/SP/CharLeft.asm (100%) rename {library-asm => arch/zx48k/library-asm}/SP/CharRight.asm (100%) rename {library-asm => arch/zx48k/library-asm}/SP/GetScrnAddr.asm (100%) rename {library-asm => arch/zx48k/library-asm}/SP/PixelDown.asm (100%) rename {library-asm => arch/zx48k/library-asm}/SP/PixelLeft.asm (100%) rename {library-asm => arch/zx48k/library-asm}/SP/PixelRight.asm (100%) rename {library-asm => arch/zx48k/library-asm}/SP/PixelUp.asm (100%) rename {library-asm => arch/zx48k/library-asm}/_mul32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/abs16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/abs32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/abs8.asm (100%) rename {library-asm => arch/zx48k/library-asm}/absf.asm (100%) rename {library-asm => arch/zx48k/library-asm}/acos.asm (100%) rename {library-asm => arch/zx48k/library-asm}/addf.asm (100%) rename {library-asm => arch/zx48k/library-asm}/alloc.asm (100%) rename {library-asm => arch/zx48k/library-asm}/and16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/and32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/and8.asm (100%) rename {library-asm => arch/zx48k/library-asm}/andf.asm (100%) rename {library-asm => arch/zx48k/library-asm}/array.asm (100%) rename {library-asm => arch/zx48k/library-asm}/arrayalloc.asm (100%) rename {library-asm => arch/zx48k/library-asm}/arraystrfree.asm (100%) rename {library-asm => arch/zx48k/library-asm}/asc.asm (100%) rename {library-asm => arch/zx48k/library-asm}/asin.asm (100%) rename {library-asm => arch/zx48k/library-asm}/atan.asm (100%) rename {library-asm => arch/zx48k/library-asm}/attr.asm (100%) rename {library-asm => arch/zx48k/library-asm}/band16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/band32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/beep.asm (100%) rename {library-asm => arch/zx48k/library-asm}/beeper.asm (100%) rename {library-asm => arch/zx48k/library-asm}/bnot16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/bnot32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/bold.asm (100%) rename {library-asm => arch/zx48k/library-asm}/bor16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/bor32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/border.asm (100%) rename {library-asm => arch/zx48k/library-asm}/bound.asm (100%) rename {library-asm => arch/zx48k/library-asm}/break.asm (100%) rename {library-asm => arch/zx48k/library-asm}/bright.asm (100%) rename {library-asm => arch/zx48k/library-asm}/bxor16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/bxor32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/calloc.asm (100%) rename {library-asm => arch/zx48k/library-asm}/chr.asm (100%) rename {library-asm => arch/zx48k/library-asm}/circle.asm (100%) rename {library-asm => arch/zx48k/library-asm}/cls.asm (100%) rename {library-asm => arch/zx48k/library-asm}/const.asm (100%) rename {library-asm => arch/zx48k/library-asm}/copy_attr.asm (100%) rename {library-asm => arch/zx48k/library-asm}/cos.asm (100%) rename {library-asm => arch/zx48k/library-asm}/div16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/div32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/div8.asm (100%) rename {library-asm => arch/zx48k/library-asm}/divf.asm (100%) rename {library-asm => arch/zx48k/library-asm}/divf16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/draw.asm (100%) rename {library-asm => arch/zx48k/library-asm}/draw3.asm (100%) rename {library-asm => arch/zx48k/library-asm}/eq16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/eq32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/eqf.asm (100%) rename {library-asm => arch/zx48k/library-asm}/error.asm (100%) rename {library-asm => arch/zx48k/library-asm}/exp.asm (100%) rename {library-asm => arch/zx48k/library-asm}/f16tofreg.asm (100%) rename {library-asm => arch/zx48k/library-asm}/flash.asm (100%) rename {library-asm => arch/zx48k/library-asm}/free.asm (100%) rename {library-asm => arch/zx48k/library-asm}/ftof16reg.asm (100%) rename {library-asm => arch/zx48k/library-asm}/ftou32reg.asm (100%) rename {library-asm => arch/zx48k/library-asm}/gef.asm (100%) rename {library-asm => arch/zx48k/library-asm}/gtf.asm (100%) rename {library-asm => arch/zx48k/library-asm}/heapinit.asm (100%) rename {library-asm => arch/zx48k/library-asm}/iload32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/iloadf.asm (100%) rename {library-asm => arch/zx48k/library-asm}/in_screen.asm (100%) rename {library-asm => arch/zx48k/library-asm}/ink.asm (100%) rename {library-asm => arch/zx48k/library-asm}/inkey.asm (100%) rename {library-asm => arch/zx48k/library-asm}/inverse.asm (100%) rename {library-asm => arch/zx48k/library-asm}/istore16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/italic.asm (100%) rename {library-asm => arch/zx48k/library-asm}/lddede.asm (100%) rename {library-asm => arch/zx48k/library-asm}/lef.asm (100%) rename {library-asm => arch/zx48k/library-asm}/lei16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/lei32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/lei8.asm (100%) rename {library-asm => arch/zx48k/library-asm}/letsubstr.asm (100%) rename {library-asm => arch/zx48k/library-asm}/load.asm (100%) rename {library-asm => arch/zx48k/library-asm}/loadstr.asm (100%) rename {library-asm => arch/zx48k/library-asm}/logn.asm (100%) rename {library-asm => arch/zx48k/library-asm}/ltf.asm (100%) rename {library-asm => arch/zx48k/library-asm}/lti16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/lti32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/lti8.asm (100%) rename {library-asm => arch/zx48k/library-asm}/memcopy.asm (100%) rename {library-asm => arch/zx48k/library-asm}/modf.asm (100%) rename {library-asm => arch/zx48k/library-asm}/modf16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/mul16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/mul32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/mul8.asm (100%) rename {library-asm => arch/zx48k/library-asm}/mulf.asm (100%) rename {library-asm => arch/zx48k/library-asm}/mulf16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/nef.asm (100%) rename {library-asm => arch/zx48k/library-asm}/neg16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/neg32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/negf.asm (100%) rename {library-asm => arch/zx48k/library-asm}/not32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/notf.asm (100%) rename {library-asm => arch/zx48k/library-asm}/ongoto.asm (100%) rename {library-asm => arch/zx48k/library-asm}/or32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/orf.asm (100%) rename {library-asm => arch/zx48k/library-asm}/over.asm (100%) rename {library-asm => arch/zx48k/library-asm}/paper.asm (100%) rename {library-asm => arch/zx48k/library-asm}/pause.asm (100%) rename {library-asm => arch/zx48k/library-asm}/pistore32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/ploadf.asm (100%) rename {library-asm => arch/zx48k/library-asm}/plot.asm (100%) rename {library-asm => arch/zx48k/library-asm}/pow.asm (100%) rename {library-asm => arch/zx48k/library-asm}/print.asm (100%) rename {library-asm => arch/zx48k/library-asm}/print_eol_attr.asm (100%) rename {library-asm => arch/zx48k/library-asm}/printf.asm (100%) rename {library-asm => arch/zx48k/library-asm}/printf16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/printi16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/printi32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/printi8.asm (100%) rename {library-asm => arch/zx48k/library-asm}/printnum.asm (100%) rename {library-asm => arch/zx48k/library-asm}/printstr.asm (100%) rename {library-asm => arch/zx48k/library-asm}/printu16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/printu32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/printu8.asm (100%) rename {library-asm => arch/zx48k/library-asm}/pstore32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/pstoref.asm (100%) rename {library-asm => arch/zx48k/library-asm}/pstorestr.asm (100%) rename {library-asm => arch/zx48k/library-asm}/pstorestr2.asm (100%) rename {library-asm => arch/zx48k/library-asm}/pushf.asm (100%) rename {library-asm => arch/zx48k/library-asm}/random.asm (100%) rename {library-asm => arch/zx48k/library-asm}/read_restore.asm (100%) rename {library-asm => arch/zx48k/library-asm}/realloc.asm (100%) rename {library-asm => arch/zx48k/library-asm}/save.asm (100%) rename {library-asm => arch/zx48k/library-asm}/sgn.asm (100%) rename {library-asm => arch/zx48k/library-asm}/sgnf.asm (100%) rename {library-asm => arch/zx48k/library-asm}/sgnf16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/sgni16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/sgni32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/sgni8.asm (100%) rename {library-asm => arch/zx48k/library-asm}/sgnu16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/sgnu32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/sgnu8.asm (100%) rename {library-asm => arch/zx48k/library-asm}/shl32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/shra32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/shrl32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/sin.asm (100%) rename {library-asm => arch/zx48k/library-asm}/spectranet.inc (100%) rename {library-asm => arch/zx48k/library-asm}/sposn.asm (100%) rename {library-asm => arch/zx48k/library-asm}/sqrt.asm (100%) rename {library-asm => arch/zx48k/library-asm}/stackf.asm (100%) rename {library-asm => arch/zx48k/library-asm}/store32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/storef.asm (100%) rename {library-asm => arch/zx48k/library-asm}/storestr.asm (100%) rename {library-asm => arch/zx48k/library-asm}/storestr2.asm (100%) rename {library-asm => arch/zx48k/library-asm}/str.asm (100%) rename {library-asm => arch/zx48k/library-asm}/strarraycpy.asm (100%) rename {library-asm => arch/zx48k/library-asm}/strcat.asm (100%) rename {library-asm => arch/zx48k/library-asm}/strcpy.asm (100%) rename {library-asm => arch/zx48k/library-asm}/strictbool.asm (100%) rename {library-asm => arch/zx48k/library-asm}/string.asm (100%) rename {library-asm => arch/zx48k/library-asm}/strlen.asm (100%) rename {library-asm => arch/zx48k/library-asm}/strslice.asm (100%) rename {library-asm => arch/zx48k/library-asm}/sub32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/subf.asm (100%) rename {library-asm => arch/zx48k/library-asm}/swap32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/table_jump.asm (100%) rename {library-asm => arch/zx48k/library-asm}/tan.asm (100%) rename {library-asm => arch/zx48k/library-asm}/u32tofreg.asm (100%) rename {library-asm => arch/zx48k/library-asm}/usr.asm (100%) rename {library-asm => arch/zx48k/library-asm}/usr_str.asm (100%) rename {library-asm => arch/zx48k/library-asm}/val.asm (100%) rename {library-asm => arch/zx48k/library-asm}/xor16.asm (100%) rename {library-asm => arch/zx48k/library-asm}/xor32.asm (100%) rename {library-asm => arch/zx48k/library-asm}/xor8.asm (100%) rename {library-asm => arch/zx48k/library-asm}/xorf.asm (100%) rename {library => arch/zx48k/library}/README (100%) rename {library => arch/zx48k/library}/SP/Fill.bas (100%) rename {library => arch/zx48k/library}/alloc.bas (100%) rename {library => arch/zx48k/library}/asc.bas (100%) rename {library => arch/zx48k/library}/attr.bas (100%) rename {library => arch/zx48k/library}/basic.bas (100%) rename {library => arch/zx48k/library}/csrlin.bas (100%) rename {library => arch/zx48k/library}/esxdos.bas (100%) rename {library => arch/zx48k/library}/fastplot.bas (100%) rename {library => arch/zx48k/library}/haplofnt.bin (100%) rename {library => arch/zx48k/library}/hex.bas (100%) rename {library => arch/zx48k/library}/input.bas (100%) rename {library => arch/zx48k/library}/input42.bas (100%) rename {library => arch/zx48k/library}/keys.bas (100%) rename {library => arch/zx48k/library}/lcase.bas (100%) rename {library => arch/zx48k/library}/megalz.bas (100%) rename {library => arch/zx48k/library}/memcopy.bas (100%) rename {library => arch/zx48k/library}/mj/fourspriter.bas (100%) rename {library => arch/zx48k/library}/point.bas (100%) rename {library => arch/zx48k/library}/pos.bas (100%) rename {library => arch/zx48k/library}/print42.bas (100%) rename {library => arch/zx48k/library}/print64.bas (100%) rename {library => arch/zx48k/library}/printfzx.bas (100%) rename {library => arch/zx48k/library}/radastan.bas (100%) rename {library => arch/zx48k/library}/retrace.bas (100%) rename {library => arch/zx48k/library}/screen.bas (100%) rename {library => arch/zx48k/library}/scroll.bas (100%) rename {library => arch/zx48k/library}/sinclair.bas (100%) rename {library => arch/zx48k/library}/spectranet.bas (100%) rename {library => arch/zx48k/library}/string.bas (100%) rename {library => arch/zx48k/library}/template.bas (100%) rename {library => arch/zx48k/library}/ucase.bas (100%) rename {library => arch/zx48k/library}/winscroll.bas (100%) rename {library => arch/zx48k/library}/zxuno/uart.bas (100%) diff --git a/api/config.py b/api/config.py index 5568852ef..668bf658e 100644 --- a/api/config.py +++ b/api/config.py @@ -69,6 +69,7 @@ def init(): OPTIONS.add_option('Sinclair', bool, False) OPTIONS.add_option('strict', bool, False) # True to force type checking OPTIONS.add_option('zxnext', bool, False) # True to enable ZX Next ASM opcodes + OPTIONS.add_option('architecture', str) # Architecture init() diff --git a/arch/__init__.py b/arch/__init__.py index b73f09868..654f9f319 100755 --- a/arch/__init__.py +++ b/arch/__init__.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # vim:ts=4:et:sw=4: @@ -8,3 +8,5 @@ __all__ = [ 'zx48k', ] + +AVAILABLE_ARCHITECTURES = __all__ diff --git a/library-asm/SP/CharLeft.asm b/arch/zx48k/library-asm/SP/CharLeft.asm similarity index 100% rename from library-asm/SP/CharLeft.asm rename to arch/zx48k/library-asm/SP/CharLeft.asm diff --git a/library-asm/SP/CharRight.asm b/arch/zx48k/library-asm/SP/CharRight.asm similarity index 100% rename from library-asm/SP/CharRight.asm rename to arch/zx48k/library-asm/SP/CharRight.asm diff --git a/library-asm/SP/GetScrnAddr.asm b/arch/zx48k/library-asm/SP/GetScrnAddr.asm similarity index 100% rename from library-asm/SP/GetScrnAddr.asm rename to arch/zx48k/library-asm/SP/GetScrnAddr.asm diff --git a/library-asm/SP/PixelDown.asm b/arch/zx48k/library-asm/SP/PixelDown.asm similarity index 100% rename from library-asm/SP/PixelDown.asm rename to arch/zx48k/library-asm/SP/PixelDown.asm diff --git a/library-asm/SP/PixelLeft.asm b/arch/zx48k/library-asm/SP/PixelLeft.asm similarity index 100% rename from library-asm/SP/PixelLeft.asm rename to arch/zx48k/library-asm/SP/PixelLeft.asm diff --git a/library-asm/SP/PixelRight.asm b/arch/zx48k/library-asm/SP/PixelRight.asm similarity index 100% rename from library-asm/SP/PixelRight.asm rename to arch/zx48k/library-asm/SP/PixelRight.asm diff --git a/library-asm/SP/PixelUp.asm b/arch/zx48k/library-asm/SP/PixelUp.asm similarity index 100% rename from library-asm/SP/PixelUp.asm rename to arch/zx48k/library-asm/SP/PixelUp.asm diff --git a/library-asm/_mul32.asm b/arch/zx48k/library-asm/_mul32.asm similarity index 100% rename from library-asm/_mul32.asm rename to arch/zx48k/library-asm/_mul32.asm diff --git a/library-asm/abs16.asm b/arch/zx48k/library-asm/abs16.asm similarity index 100% rename from library-asm/abs16.asm rename to arch/zx48k/library-asm/abs16.asm diff --git a/library-asm/abs32.asm b/arch/zx48k/library-asm/abs32.asm similarity index 100% rename from library-asm/abs32.asm rename to arch/zx48k/library-asm/abs32.asm diff --git a/library-asm/abs8.asm b/arch/zx48k/library-asm/abs8.asm similarity index 100% rename from library-asm/abs8.asm rename to arch/zx48k/library-asm/abs8.asm diff --git a/library-asm/absf.asm b/arch/zx48k/library-asm/absf.asm similarity index 100% rename from library-asm/absf.asm rename to arch/zx48k/library-asm/absf.asm diff --git a/library-asm/acos.asm b/arch/zx48k/library-asm/acos.asm similarity index 100% rename from library-asm/acos.asm rename to arch/zx48k/library-asm/acos.asm diff --git a/library-asm/addf.asm b/arch/zx48k/library-asm/addf.asm similarity index 100% rename from library-asm/addf.asm rename to arch/zx48k/library-asm/addf.asm diff --git a/library-asm/alloc.asm b/arch/zx48k/library-asm/alloc.asm similarity index 100% rename from library-asm/alloc.asm rename to arch/zx48k/library-asm/alloc.asm diff --git a/library-asm/and16.asm b/arch/zx48k/library-asm/and16.asm similarity index 100% rename from library-asm/and16.asm rename to arch/zx48k/library-asm/and16.asm diff --git a/library-asm/and32.asm b/arch/zx48k/library-asm/and32.asm similarity index 100% rename from library-asm/and32.asm rename to arch/zx48k/library-asm/and32.asm diff --git a/library-asm/and8.asm b/arch/zx48k/library-asm/and8.asm similarity index 100% rename from library-asm/and8.asm rename to arch/zx48k/library-asm/and8.asm diff --git a/library-asm/andf.asm b/arch/zx48k/library-asm/andf.asm similarity index 100% rename from library-asm/andf.asm rename to arch/zx48k/library-asm/andf.asm diff --git a/library-asm/array.asm b/arch/zx48k/library-asm/array.asm similarity index 100% rename from library-asm/array.asm rename to arch/zx48k/library-asm/array.asm diff --git a/library-asm/arrayalloc.asm b/arch/zx48k/library-asm/arrayalloc.asm similarity index 100% rename from library-asm/arrayalloc.asm rename to arch/zx48k/library-asm/arrayalloc.asm diff --git a/library-asm/arraystrfree.asm b/arch/zx48k/library-asm/arraystrfree.asm similarity index 100% rename from library-asm/arraystrfree.asm rename to arch/zx48k/library-asm/arraystrfree.asm diff --git a/library-asm/asc.asm b/arch/zx48k/library-asm/asc.asm similarity index 100% rename from library-asm/asc.asm rename to arch/zx48k/library-asm/asc.asm diff --git a/library-asm/asin.asm b/arch/zx48k/library-asm/asin.asm similarity index 100% rename from library-asm/asin.asm rename to arch/zx48k/library-asm/asin.asm diff --git a/library-asm/atan.asm b/arch/zx48k/library-asm/atan.asm similarity index 100% rename from library-asm/atan.asm rename to arch/zx48k/library-asm/atan.asm diff --git a/library-asm/attr.asm b/arch/zx48k/library-asm/attr.asm similarity index 100% rename from library-asm/attr.asm rename to arch/zx48k/library-asm/attr.asm diff --git a/library-asm/band16.asm b/arch/zx48k/library-asm/band16.asm similarity index 100% rename from library-asm/band16.asm rename to arch/zx48k/library-asm/band16.asm diff --git a/library-asm/band32.asm b/arch/zx48k/library-asm/band32.asm similarity index 100% rename from library-asm/band32.asm rename to arch/zx48k/library-asm/band32.asm diff --git a/library-asm/beep.asm b/arch/zx48k/library-asm/beep.asm similarity index 100% rename from library-asm/beep.asm rename to arch/zx48k/library-asm/beep.asm diff --git a/library-asm/beeper.asm b/arch/zx48k/library-asm/beeper.asm similarity index 100% rename from library-asm/beeper.asm rename to arch/zx48k/library-asm/beeper.asm diff --git a/library-asm/bnot16.asm b/arch/zx48k/library-asm/bnot16.asm similarity index 100% rename from library-asm/bnot16.asm rename to arch/zx48k/library-asm/bnot16.asm diff --git a/library-asm/bnot32.asm b/arch/zx48k/library-asm/bnot32.asm similarity index 100% rename from library-asm/bnot32.asm rename to arch/zx48k/library-asm/bnot32.asm diff --git a/library-asm/bold.asm b/arch/zx48k/library-asm/bold.asm similarity index 100% rename from library-asm/bold.asm rename to arch/zx48k/library-asm/bold.asm diff --git a/library-asm/bor16.asm b/arch/zx48k/library-asm/bor16.asm similarity index 100% rename from library-asm/bor16.asm rename to arch/zx48k/library-asm/bor16.asm diff --git a/library-asm/bor32.asm b/arch/zx48k/library-asm/bor32.asm similarity index 100% rename from library-asm/bor32.asm rename to arch/zx48k/library-asm/bor32.asm diff --git a/library-asm/border.asm b/arch/zx48k/library-asm/border.asm similarity index 100% rename from library-asm/border.asm rename to arch/zx48k/library-asm/border.asm diff --git a/library-asm/bound.asm b/arch/zx48k/library-asm/bound.asm similarity index 100% rename from library-asm/bound.asm rename to arch/zx48k/library-asm/bound.asm diff --git a/library-asm/break.asm b/arch/zx48k/library-asm/break.asm similarity index 100% rename from library-asm/break.asm rename to arch/zx48k/library-asm/break.asm diff --git a/library-asm/bright.asm b/arch/zx48k/library-asm/bright.asm similarity index 100% rename from library-asm/bright.asm rename to arch/zx48k/library-asm/bright.asm diff --git a/library-asm/bxor16.asm b/arch/zx48k/library-asm/bxor16.asm similarity index 100% rename from library-asm/bxor16.asm rename to arch/zx48k/library-asm/bxor16.asm diff --git a/library-asm/bxor32.asm b/arch/zx48k/library-asm/bxor32.asm similarity index 100% rename from library-asm/bxor32.asm rename to arch/zx48k/library-asm/bxor32.asm diff --git a/library-asm/calloc.asm b/arch/zx48k/library-asm/calloc.asm similarity index 100% rename from library-asm/calloc.asm rename to arch/zx48k/library-asm/calloc.asm diff --git a/library-asm/chr.asm b/arch/zx48k/library-asm/chr.asm similarity index 100% rename from library-asm/chr.asm rename to arch/zx48k/library-asm/chr.asm diff --git a/library-asm/circle.asm b/arch/zx48k/library-asm/circle.asm similarity index 100% rename from library-asm/circle.asm rename to arch/zx48k/library-asm/circle.asm diff --git a/library-asm/cls.asm b/arch/zx48k/library-asm/cls.asm similarity index 100% rename from library-asm/cls.asm rename to arch/zx48k/library-asm/cls.asm diff --git a/library-asm/const.asm b/arch/zx48k/library-asm/const.asm similarity index 100% rename from library-asm/const.asm rename to arch/zx48k/library-asm/const.asm diff --git a/library-asm/copy_attr.asm b/arch/zx48k/library-asm/copy_attr.asm similarity index 100% rename from library-asm/copy_attr.asm rename to arch/zx48k/library-asm/copy_attr.asm diff --git a/library-asm/cos.asm b/arch/zx48k/library-asm/cos.asm similarity index 100% rename from library-asm/cos.asm rename to arch/zx48k/library-asm/cos.asm diff --git a/library-asm/div16.asm b/arch/zx48k/library-asm/div16.asm similarity index 100% rename from library-asm/div16.asm rename to arch/zx48k/library-asm/div16.asm diff --git a/library-asm/div32.asm b/arch/zx48k/library-asm/div32.asm similarity index 100% rename from library-asm/div32.asm rename to arch/zx48k/library-asm/div32.asm diff --git a/library-asm/div8.asm b/arch/zx48k/library-asm/div8.asm similarity index 100% rename from library-asm/div8.asm rename to arch/zx48k/library-asm/div8.asm diff --git a/library-asm/divf.asm b/arch/zx48k/library-asm/divf.asm similarity index 100% rename from library-asm/divf.asm rename to arch/zx48k/library-asm/divf.asm diff --git a/library-asm/divf16.asm b/arch/zx48k/library-asm/divf16.asm similarity index 100% rename from library-asm/divf16.asm rename to arch/zx48k/library-asm/divf16.asm diff --git a/library-asm/draw.asm b/arch/zx48k/library-asm/draw.asm similarity index 100% rename from library-asm/draw.asm rename to arch/zx48k/library-asm/draw.asm diff --git a/library-asm/draw3.asm b/arch/zx48k/library-asm/draw3.asm similarity index 100% rename from library-asm/draw3.asm rename to arch/zx48k/library-asm/draw3.asm diff --git a/library-asm/eq16.asm b/arch/zx48k/library-asm/eq16.asm similarity index 100% rename from library-asm/eq16.asm rename to arch/zx48k/library-asm/eq16.asm diff --git a/library-asm/eq32.asm b/arch/zx48k/library-asm/eq32.asm similarity index 100% rename from library-asm/eq32.asm rename to arch/zx48k/library-asm/eq32.asm diff --git a/library-asm/eqf.asm b/arch/zx48k/library-asm/eqf.asm similarity index 100% rename from library-asm/eqf.asm rename to arch/zx48k/library-asm/eqf.asm diff --git a/library-asm/error.asm b/arch/zx48k/library-asm/error.asm similarity index 100% rename from library-asm/error.asm rename to arch/zx48k/library-asm/error.asm diff --git a/library-asm/exp.asm b/arch/zx48k/library-asm/exp.asm similarity index 100% rename from library-asm/exp.asm rename to arch/zx48k/library-asm/exp.asm diff --git a/library-asm/f16tofreg.asm b/arch/zx48k/library-asm/f16tofreg.asm similarity index 100% rename from library-asm/f16tofreg.asm rename to arch/zx48k/library-asm/f16tofreg.asm diff --git a/library-asm/flash.asm b/arch/zx48k/library-asm/flash.asm similarity index 100% rename from library-asm/flash.asm rename to arch/zx48k/library-asm/flash.asm diff --git a/library-asm/free.asm b/arch/zx48k/library-asm/free.asm similarity index 100% rename from library-asm/free.asm rename to arch/zx48k/library-asm/free.asm diff --git a/library-asm/ftof16reg.asm b/arch/zx48k/library-asm/ftof16reg.asm similarity index 100% rename from library-asm/ftof16reg.asm rename to arch/zx48k/library-asm/ftof16reg.asm diff --git a/library-asm/ftou32reg.asm b/arch/zx48k/library-asm/ftou32reg.asm similarity index 100% rename from library-asm/ftou32reg.asm rename to arch/zx48k/library-asm/ftou32reg.asm diff --git a/library-asm/gef.asm b/arch/zx48k/library-asm/gef.asm similarity index 100% rename from library-asm/gef.asm rename to arch/zx48k/library-asm/gef.asm diff --git a/library-asm/gtf.asm b/arch/zx48k/library-asm/gtf.asm similarity index 100% rename from library-asm/gtf.asm rename to arch/zx48k/library-asm/gtf.asm diff --git a/library-asm/heapinit.asm b/arch/zx48k/library-asm/heapinit.asm similarity index 100% rename from library-asm/heapinit.asm rename to arch/zx48k/library-asm/heapinit.asm diff --git a/library-asm/iload32.asm b/arch/zx48k/library-asm/iload32.asm similarity index 100% rename from library-asm/iload32.asm rename to arch/zx48k/library-asm/iload32.asm diff --git a/library-asm/iloadf.asm b/arch/zx48k/library-asm/iloadf.asm similarity index 100% rename from library-asm/iloadf.asm rename to arch/zx48k/library-asm/iloadf.asm diff --git a/library-asm/in_screen.asm b/arch/zx48k/library-asm/in_screen.asm similarity index 100% rename from library-asm/in_screen.asm rename to arch/zx48k/library-asm/in_screen.asm diff --git a/library-asm/ink.asm b/arch/zx48k/library-asm/ink.asm similarity index 100% rename from library-asm/ink.asm rename to arch/zx48k/library-asm/ink.asm diff --git a/library-asm/inkey.asm b/arch/zx48k/library-asm/inkey.asm similarity index 100% rename from library-asm/inkey.asm rename to arch/zx48k/library-asm/inkey.asm diff --git a/library-asm/inverse.asm b/arch/zx48k/library-asm/inverse.asm similarity index 100% rename from library-asm/inverse.asm rename to arch/zx48k/library-asm/inverse.asm diff --git a/library-asm/istore16.asm b/arch/zx48k/library-asm/istore16.asm similarity index 100% rename from library-asm/istore16.asm rename to arch/zx48k/library-asm/istore16.asm diff --git a/library-asm/italic.asm b/arch/zx48k/library-asm/italic.asm similarity index 100% rename from library-asm/italic.asm rename to arch/zx48k/library-asm/italic.asm diff --git a/library-asm/lddede.asm b/arch/zx48k/library-asm/lddede.asm similarity index 100% rename from library-asm/lddede.asm rename to arch/zx48k/library-asm/lddede.asm diff --git a/library-asm/lef.asm b/arch/zx48k/library-asm/lef.asm similarity index 100% rename from library-asm/lef.asm rename to arch/zx48k/library-asm/lef.asm diff --git a/library-asm/lei16.asm b/arch/zx48k/library-asm/lei16.asm similarity index 100% rename from library-asm/lei16.asm rename to arch/zx48k/library-asm/lei16.asm diff --git a/library-asm/lei32.asm b/arch/zx48k/library-asm/lei32.asm similarity index 100% rename from library-asm/lei32.asm rename to arch/zx48k/library-asm/lei32.asm diff --git a/library-asm/lei8.asm b/arch/zx48k/library-asm/lei8.asm similarity index 100% rename from library-asm/lei8.asm rename to arch/zx48k/library-asm/lei8.asm diff --git a/library-asm/letsubstr.asm b/arch/zx48k/library-asm/letsubstr.asm similarity index 100% rename from library-asm/letsubstr.asm rename to arch/zx48k/library-asm/letsubstr.asm diff --git a/library-asm/load.asm b/arch/zx48k/library-asm/load.asm similarity index 100% rename from library-asm/load.asm rename to arch/zx48k/library-asm/load.asm diff --git a/library-asm/loadstr.asm b/arch/zx48k/library-asm/loadstr.asm similarity index 100% rename from library-asm/loadstr.asm rename to arch/zx48k/library-asm/loadstr.asm diff --git a/library-asm/logn.asm b/arch/zx48k/library-asm/logn.asm similarity index 100% rename from library-asm/logn.asm rename to arch/zx48k/library-asm/logn.asm diff --git a/library-asm/ltf.asm b/arch/zx48k/library-asm/ltf.asm similarity index 100% rename from library-asm/ltf.asm rename to arch/zx48k/library-asm/ltf.asm diff --git a/library-asm/lti16.asm b/arch/zx48k/library-asm/lti16.asm similarity index 100% rename from library-asm/lti16.asm rename to arch/zx48k/library-asm/lti16.asm diff --git a/library-asm/lti32.asm b/arch/zx48k/library-asm/lti32.asm similarity index 100% rename from library-asm/lti32.asm rename to arch/zx48k/library-asm/lti32.asm diff --git a/library-asm/lti8.asm b/arch/zx48k/library-asm/lti8.asm similarity index 100% rename from library-asm/lti8.asm rename to arch/zx48k/library-asm/lti8.asm diff --git a/library-asm/memcopy.asm b/arch/zx48k/library-asm/memcopy.asm similarity index 100% rename from library-asm/memcopy.asm rename to arch/zx48k/library-asm/memcopy.asm diff --git a/library-asm/modf.asm b/arch/zx48k/library-asm/modf.asm similarity index 100% rename from library-asm/modf.asm rename to arch/zx48k/library-asm/modf.asm diff --git a/library-asm/modf16.asm b/arch/zx48k/library-asm/modf16.asm similarity index 100% rename from library-asm/modf16.asm rename to arch/zx48k/library-asm/modf16.asm diff --git a/library-asm/mul16.asm b/arch/zx48k/library-asm/mul16.asm similarity index 100% rename from library-asm/mul16.asm rename to arch/zx48k/library-asm/mul16.asm diff --git a/library-asm/mul32.asm b/arch/zx48k/library-asm/mul32.asm similarity index 100% rename from library-asm/mul32.asm rename to arch/zx48k/library-asm/mul32.asm diff --git a/library-asm/mul8.asm b/arch/zx48k/library-asm/mul8.asm similarity index 100% rename from library-asm/mul8.asm rename to arch/zx48k/library-asm/mul8.asm diff --git a/library-asm/mulf.asm b/arch/zx48k/library-asm/mulf.asm similarity index 100% rename from library-asm/mulf.asm rename to arch/zx48k/library-asm/mulf.asm diff --git a/library-asm/mulf16.asm b/arch/zx48k/library-asm/mulf16.asm similarity index 100% rename from library-asm/mulf16.asm rename to arch/zx48k/library-asm/mulf16.asm diff --git a/library-asm/nef.asm b/arch/zx48k/library-asm/nef.asm similarity index 100% rename from library-asm/nef.asm rename to arch/zx48k/library-asm/nef.asm diff --git a/library-asm/neg16.asm b/arch/zx48k/library-asm/neg16.asm similarity index 100% rename from library-asm/neg16.asm rename to arch/zx48k/library-asm/neg16.asm diff --git a/library-asm/neg32.asm b/arch/zx48k/library-asm/neg32.asm similarity index 100% rename from library-asm/neg32.asm rename to arch/zx48k/library-asm/neg32.asm diff --git a/library-asm/negf.asm b/arch/zx48k/library-asm/negf.asm similarity index 100% rename from library-asm/negf.asm rename to arch/zx48k/library-asm/negf.asm diff --git a/library-asm/not32.asm b/arch/zx48k/library-asm/not32.asm similarity index 100% rename from library-asm/not32.asm rename to arch/zx48k/library-asm/not32.asm diff --git a/library-asm/notf.asm b/arch/zx48k/library-asm/notf.asm similarity index 100% rename from library-asm/notf.asm rename to arch/zx48k/library-asm/notf.asm diff --git a/library-asm/ongoto.asm b/arch/zx48k/library-asm/ongoto.asm similarity index 100% rename from library-asm/ongoto.asm rename to arch/zx48k/library-asm/ongoto.asm diff --git a/library-asm/or32.asm b/arch/zx48k/library-asm/or32.asm similarity index 100% rename from library-asm/or32.asm rename to arch/zx48k/library-asm/or32.asm diff --git a/library-asm/orf.asm b/arch/zx48k/library-asm/orf.asm similarity index 100% rename from library-asm/orf.asm rename to arch/zx48k/library-asm/orf.asm diff --git a/library-asm/over.asm b/arch/zx48k/library-asm/over.asm similarity index 100% rename from library-asm/over.asm rename to arch/zx48k/library-asm/over.asm diff --git a/library-asm/paper.asm b/arch/zx48k/library-asm/paper.asm similarity index 100% rename from library-asm/paper.asm rename to arch/zx48k/library-asm/paper.asm diff --git a/library-asm/pause.asm b/arch/zx48k/library-asm/pause.asm similarity index 100% rename from library-asm/pause.asm rename to arch/zx48k/library-asm/pause.asm diff --git a/library-asm/pistore32.asm b/arch/zx48k/library-asm/pistore32.asm similarity index 100% rename from library-asm/pistore32.asm rename to arch/zx48k/library-asm/pistore32.asm diff --git a/library-asm/ploadf.asm b/arch/zx48k/library-asm/ploadf.asm similarity index 100% rename from library-asm/ploadf.asm rename to arch/zx48k/library-asm/ploadf.asm diff --git a/library-asm/plot.asm b/arch/zx48k/library-asm/plot.asm similarity index 100% rename from library-asm/plot.asm rename to arch/zx48k/library-asm/plot.asm diff --git a/library-asm/pow.asm b/arch/zx48k/library-asm/pow.asm similarity index 100% rename from library-asm/pow.asm rename to arch/zx48k/library-asm/pow.asm diff --git a/library-asm/print.asm b/arch/zx48k/library-asm/print.asm similarity index 100% rename from library-asm/print.asm rename to arch/zx48k/library-asm/print.asm diff --git a/library-asm/print_eol_attr.asm b/arch/zx48k/library-asm/print_eol_attr.asm similarity index 100% rename from library-asm/print_eol_attr.asm rename to arch/zx48k/library-asm/print_eol_attr.asm diff --git a/library-asm/printf.asm b/arch/zx48k/library-asm/printf.asm similarity index 100% rename from library-asm/printf.asm rename to arch/zx48k/library-asm/printf.asm diff --git a/library-asm/printf16.asm b/arch/zx48k/library-asm/printf16.asm similarity index 100% rename from library-asm/printf16.asm rename to arch/zx48k/library-asm/printf16.asm diff --git a/library-asm/printi16.asm b/arch/zx48k/library-asm/printi16.asm similarity index 100% rename from library-asm/printi16.asm rename to arch/zx48k/library-asm/printi16.asm diff --git a/library-asm/printi32.asm b/arch/zx48k/library-asm/printi32.asm similarity index 100% rename from library-asm/printi32.asm rename to arch/zx48k/library-asm/printi32.asm diff --git a/library-asm/printi8.asm b/arch/zx48k/library-asm/printi8.asm similarity index 100% rename from library-asm/printi8.asm rename to arch/zx48k/library-asm/printi8.asm diff --git a/library-asm/printnum.asm b/arch/zx48k/library-asm/printnum.asm similarity index 100% rename from library-asm/printnum.asm rename to arch/zx48k/library-asm/printnum.asm diff --git a/library-asm/printstr.asm b/arch/zx48k/library-asm/printstr.asm similarity index 100% rename from library-asm/printstr.asm rename to arch/zx48k/library-asm/printstr.asm diff --git a/library-asm/printu16.asm b/arch/zx48k/library-asm/printu16.asm similarity index 100% rename from library-asm/printu16.asm rename to arch/zx48k/library-asm/printu16.asm diff --git a/library-asm/printu32.asm b/arch/zx48k/library-asm/printu32.asm similarity index 100% rename from library-asm/printu32.asm rename to arch/zx48k/library-asm/printu32.asm diff --git a/library-asm/printu8.asm b/arch/zx48k/library-asm/printu8.asm similarity index 100% rename from library-asm/printu8.asm rename to arch/zx48k/library-asm/printu8.asm diff --git a/library-asm/pstore32.asm b/arch/zx48k/library-asm/pstore32.asm similarity index 100% rename from library-asm/pstore32.asm rename to arch/zx48k/library-asm/pstore32.asm diff --git a/library-asm/pstoref.asm b/arch/zx48k/library-asm/pstoref.asm similarity index 100% rename from library-asm/pstoref.asm rename to arch/zx48k/library-asm/pstoref.asm diff --git a/library-asm/pstorestr.asm b/arch/zx48k/library-asm/pstorestr.asm similarity index 100% rename from library-asm/pstorestr.asm rename to arch/zx48k/library-asm/pstorestr.asm diff --git a/library-asm/pstorestr2.asm b/arch/zx48k/library-asm/pstorestr2.asm similarity index 100% rename from library-asm/pstorestr2.asm rename to arch/zx48k/library-asm/pstorestr2.asm diff --git a/library-asm/pushf.asm b/arch/zx48k/library-asm/pushf.asm similarity index 100% rename from library-asm/pushf.asm rename to arch/zx48k/library-asm/pushf.asm diff --git a/library-asm/random.asm b/arch/zx48k/library-asm/random.asm similarity index 100% rename from library-asm/random.asm rename to arch/zx48k/library-asm/random.asm diff --git a/library-asm/read_restore.asm b/arch/zx48k/library-asm/read_restore.asm similarity index 100% rename from library-asm/read_restore.asm rename to arch/zx48k/library-asm/read_restore.asm diff --git a/library-asm/realloc.asm b/arch/zx48k/library-asm/realloc.asm similarity index 100% rename from library-asm/realloc.asm rename to arch/zx48k/library-asm/realloc.asm diff --git a/library-asm/save.asm b/arch/zx48k/library-asm/save.asm similarity index 100% rename from library-asm/save.asm rename to arch/zx48k/library-asm/save.asm diff --git a/library-asm/sgn.asm b/arch/zx48k/library-asm/sgn.asm similarity index 100% rename from library-asm/sgn.asm rename to arch/zx48k/library-asm/sgn.asm diff --git a/library-asm/sgnf.asm b/arch/zx48k/library-asm/sgnf.asm similarity index 100% rename from library-asm/sgnf.asm rename to arch/zx48k/library-asm/sgnf.asm diff --git a/library-asm/sgnf16.asm b/arch/zx48k/library-asm/sgnf16.asm similarity index 100% rename from library-asm/sgnf16.asm rename to arch/zx48k/library-asm/sgnf16.asm diff --git a/library-asm/sgni16.asm b/arch/zx48k/library-asm/sgni16.asm similarity index 100% rename from library-asm/sgni16.asm rename to arch/zx48k/library-asm/sgni16.asm diff --git a/library-asm/sgni32.asm b/arch/zx48k/library-asm/sgni32.asm similarity index 100% rename from library-asm/sgni32.asm rename to arch/zx48k/library-asm/sgni32.asm diff --git a/library-asm/sgni8.asm b/arch/zx48k/library-asm/sgni8.asm similarity index 100% rename from library-asm/sgni8.asm rename to arch/zx48k/library-asm/sgni8.asm diff --git a/library-asm/sgnu16.asm b/arch/zx48k/library-asm/sgnu16.asm similarity index 100% rename from library-asm/sgnu16.asm rename to arch/zx48k/library-asm/sgnu16.asm diff --git a/library-asm/sgnu32.asm b/arch/zx48k/library-asm/sgnu32.asm similarity index 100% rename from library-asm/sgnu32.asm rename to arch/zx48k/library-asm/sgnu32.asm diff --git a/library-asm/sgnu8.asm b/arch/zx48k/library-asm/sgnu8.asm similarity index 100% rename from library-asm/sgnu8.asm rename to arch/zx48k/library-asm/sgnu8.asm diff --git a/library-asm/shl32.asm b/arch/zx48k/library-asm/shl32.asm similarity index 100% rename from library-asm/shl32.asm rename to arch/zx48k/library-asm/shl32.asm diff --git a/library-asm/shra32.asm b/arch/zx48k/library-asm/shra32.asm similarity index 100% rename from library-asm/shra32.asm rename to arch/zx48k/library-asm/shra32.asm diff --git a/library-asm/shrl32.asm b/arch/zx48k/library-asm/shrl32.asm similarity index 100% rename from library-asm/shrl32.asm rename to arch/zx48k/library-asm/shrl32.asm diff --git a/library-asm/sin.asm b/arch/zx48k/library-asm/sin.asm similarity index 100% rename from library-asm/sin.asm rename to arch/zx48k/library-asm/sin.asm diff --git a/library-asm/spectranet.inc b/arch/zx48k/library-asm/spectranet.inc similarity index 100% rename from library-asm/spectranet.inc rename to arch/zx48k/library-asm/spectranet.inc diff --git a/library-asm/sposn.asm b/arch/zx48k/library-asm/sposn.asm similarity index 100% rename from library-asm/sposn.asm rename to arch/zx48k/library-asm/sposn.asm diff --git a/library-asm/sqrt.asm b/arch/zx48k/library-asm/sqrt.asm similarity index 100% rename from library-asm/sqrt.asm rename to arch/zx48k/library-asm/sqrt.asm diff --git a/library-asm/stackf.asm b/arch/zx48k/library-asm/stackf.asm similarity index 100% rename from library-asm/stackf.asm rename to arch/zx48k/library-asm/stackf.asm diff --git a/library-asm/store32.asm b/arch/zx48k/library-asm/store32.asm similarity index 100% rename from library-asm/store32.asm rename to arch/zx48k/library-asm/store32.asm diff --git a/library-asm/storef.asm b/arch/zx48k/library-asm/storef.asm similarity index 100% rename from library-asm/storef.asm rename to arch/zx48k/library-asm/storef.asm diff --git a/library-asm/storestr.asm b/arch/zx48k/library-asm/storestr.asm similarity index 100% rename from library-asm/storestr.asm rename to arch/zx48k/library-asm/storestr.asm diff --git a/library-asm/storestr2.asm b/arch/zx48k/library-asm/storestr2.asm similarity index 100% rename from library-asm/storestr2.asm rename to arch/zx48k/library-asm/storestr2.asm diff --git a/library-asm/str.asm b/arch/zx48k/library-asm/str.asm similarity index 100% rename from library-asm/str.asm rename to arch/zx48k/library-asm/str.asm diff --git a/library-asm/strarraycpy.asm b/arch/zx48k/library-asm/strarraycpy.asm similarity index 100% rename from library-asm/strarraycpy.asm rename to arch/zx48k/library-asm/strarraycpy.asm diff --git a/library-asm/strcat.asm b/arch/zx48k/library-asm/strcat.asm similarity index 100% rename from library-asm/strcat.asm rename to arch/zx48k/library-asm/strcat.asm diff --git a/library-asm/strcpy.asm b/arch/zx48k/library-asm/strcpy.asm similarity index 100% rename from library-asm/strcpy.asm rename to arch/zx48k/library-asm/strcpy.asm diff --git a/library-asm/strictbool.asm b/arch/zx48k/library-asm/strictbool.asm similarity index 100% rename from library-asm/strictbool.asm rename to arch/zx48k/library-asm/strictbool.asm diff --git a/library-asm/string.asm b/arch/zx48k/library-asm/string.asm similarity index 100% rename from library-asm/string.asm rename to arch/zx48k/library-asm/string.asm diff --git a/library-asm/strlen.asm b/arch/zx48k/library-asm/strlen.asm similarity index 100% rename from library-asm/strlen.asm rename to arch/zx48k/library-asm/strlen.asm diff --git a/library-asm/strslice.asm b/arch/zx48k/library-asm/strslice.asm similarity index 100% rename from library-asm/strslice.asm rename to arch/zx48k/library-asm/strslice.asm diff --git a/library-asm/sub32.asm b/arch/zx48k/library-asm/sub32.asm similarity index 100% rename from library-asm/sub32.asm rename to arch/zx48k/library-asm/sub32.asm diff --git a/library-asm/subf.asm b/arch/zx48k/library-asm/subf.asm similarity index 100% rename from library-asm/subf.asm rename to arch/zx48k/library-asm/subf.asm diff --git a/library-asm/swap32.asm b/arch/zx48k/library-asm/swap32.asm similarity index 100% rename from library-asm/swap32.asm rename to arch/zx48k/library-asm/swap32.asm diff --git a/library-asm/table_jump.asm b/arch/zx48k/library-asm/table_jump.asm similarity index 100% rename from library-asm/table_jump.asm rename to arch/zx48k/library-asm/table_jump.asm diff --git a/library-asm/tan.asm b/arch/zx48k/library-asm/tan.asm similarity index 100% rename from library-asm/tan.asm rename to arch/zx48k/library-asm/tan.asm diff --git a/library-asm/u32tofreg.asm b/arch/zx48k/library-asm/u32tofreg.asm similarity index 100% rename from library-asm/u32tofreg.asm rename to arch/zx48k/library-asm/u32tofreg.asm diff --git a/library-asm/usr.asm b/arch/zx48k/library-asm/usr.asm similarity index 100% rename from library-asm/usr.asm rename to arch/zx48k/library-asm/usr.asm diff --git a/library-asm/usr_str.asm b/arch/zx48k/library-asm/usr_str.asm similarity index 100% rename from library-asm/usr_str.asm rename to arch/zx48k/library-asm/usr_str.asm diff --git a/library-asm/val.asm b/arch/zx48k/library-asm/val.asm similarity index 100% rename from library-asm/val.asm rename to arch/zx48k/library-asm/val.asm diff --git a/library-asm/xor16.asm b/arch/zx48k/library-asm/xor16.asm similarity index 100% rename from library-asm/xor16.asm rename to arch/zx48k/library-asm/xor16.asm diff --git a/library-asm/xor32.asm b/arch/zx48k/library-asm/xor32.asm similarity index 100% rename from library-asm/xor32.asm rename to arch/zx48k/library-asm/xor32.asm diff --git a/library-asm/xor8.asm b/arch/zx48k/library-asm/xor8.asm similarity index 100% rename from library-asm/xor8.asm rename to arch/zx48k/library-asm/xor8.asm diff --git a/library-asm/xorf.asm b/arch/zx48k/library-asm/xorf.asm similarity index 100% rename from library-asm/xorf.asm rename to arch/zx48k/library-asm/xorf.asm diff --git a/library/README b/arch/zx48k/library/README similarity index 100% rename from library/README rename to arch/zx48k/library/README diff --git a/library/SP/Fill.bas b/arch/zx48k/library/SP/Fill.bas similarity index 100% rename from library/SP/Fill.bas rename to arch/zx48k/library/SP/Fill.bas diff --git a/library/alloc.bas b/arch/zx48k/library/alloc.bas similarity index 100% rename from library/alloc.bas rename to arch/zx48k/library/alloc.bas diff --git a/library/asc.bas b/arch/zx48k/library/asc.bas similarity index 100% rename from library/asc.bas rename to arch/zx48k/library/asc.bas diff --git a/library/attr.bas b/arch/zx48k/library/attr.bas similarity index 100% rename from library/attr.bas rename to arch/zx48k/library/attr.bas diff --git a/library/basic.bas b/arch/zx48k/library/basic.bas similarity index 100% rename from library/basic.bas rename to arch/zx48k/library/basic.bas diff --git a/library/csrlin.bas b/arch/zx48k/library/csrlin.bas similarity index 100% rename from library/csrlin.bas rename to arch/zx48k/library/csrlin.bas diff --git a/library/esxdos.bas b/arch/zx48k/library/esxdos.bas similarity index 100% rename from library/esxdos.bas rename to arch/zx48k/library/esxdos.bas diff --git a/library/fastplot.bas b/arch/zx48k/library/fastplot.bas similarity index 100% rename from library/fastplot.bas rename to arch/zx48k/library/fastplot.bas diff --git a/library/haplofnt.bin b/arch/zx48k/library/haplofnt.bin similarity index 100% rename from library/haplofnt.bin rename to arch/zx48k/library/haplofnt.bin diff --git a/library/hex.bas b/arch/zx48k/library/hex.bas similarity index 100% rename from library/hex.bas rename to arch/zx48k/library/hex.bas diff --git a/library/input.bas b/arch/zx48k/library/input.bas similarity index 100% rename from library/input.bas rename to arch/zx48k/library/input.bas diff --git a/library/input42.bas b/arch/zx48k/library/input42.bas similarity index 100% rename from library/input42.bas rename to arch/zx48k/library/input42.bas diff --git a/library/keys.bas b/arch/zx48k/library/keys.bas similarity index 100% rename from library/keys.bas rename to arch/zx48k/library/keys.bas diff --git a/library/lcase.bas b/arch/zx48k/library/lcase.bas similarity index 100% rename from library/lcase.bas rename to arch/zx48k/library/lcase.bas diff --git a/library/megalz.bas b/arch/zx48k/library/megalz.bas similarity index 100% rename from library/megalz.bas rename to arch/zx48k/library/megalz.bas diff --git a/library/memcopy.bas b/arch/zx48k/library/memcopy.bas similarity index 100% rename from library/memcopy.bas rename to arch/zx48k/library/memcopy.bas diff --git a/library/mj/fourspriter.bas b/arch/zx48k/library/mj/fourspriter.bas similarity index 100% rename from library/mj/fourspriter.bas rename to arch/zx48k/library/mj/fourspriter.bas diff --git a/library/point.bas b/arch/zx48k/library/point.bas similarity index 100% rename from library/point.bas rename to arch/zx48k/library/point.bas diff --git a/library/pos.bas b/arch/zx48k/library/pos.bas similarity index 100% rename from library/pos.bas rename to arch/zx48k/library/pos.bas diff --git a/library/print42.bas b/arch/zx48k/library/print42.bas similarity index 100% rename from library/print42.bas rename to arch/zx48k/library/print42.bas diff --git a/library/print64.bas b/arch/zx48k/library/print64.bas similarity index 100% rename from library/print64.bas rename to arch/zx48k/library/print64.bas diff --git a/library/printfzx.bas b/arch/zx48k/library/printfzx.bas similarity index 100% rename from library/printfzx.bas rename to arch/zx48k/library/printfzx.bas diff --git a/library/radastan.bas b/arch/zx48k/library/radastan.bas similarity index 100% rename from library/radastan.bas rename to arch/zx48k/library/radastan.bas diff --git a/library/retrace.bas b/arch/zx48k/library/retrace.bas similarity index 100% rename from library/retrace.bas rename to arch/zx48k/library/retrace.bas diff --git a/library/screen.bas b/arch/zx48k/library/screen.bas similarity index 100% rename from library/screen.bas rename to arch/zx48k/library/screen.bas diff --git a/library/scroll.bas b/arch/zx48k/library/scroll.bas similarity index 100% rename from library/scroll.bas rename to arch/zx48k/library/scroll.bas diff --git a/library/sinclair.bas b/arch/zx48k/library/sinclair.bas similarity index 100% rename from library/sinclair.bas rename to arch/zx48k/library/sinclair.bas diff --git a/library/spectranet.bas b/arch/zx48k/library/spectranet.bas similarity index 100% rename from library/spectranet.bas rename to arch/zx48k/library/spectranet.bas diff --git a/library/string.bas b/arch/zx48k/library/string.bas similarity index 100% rename from library/string.bas rename to arch/zx48k/library/string.bas diff --git a/library/template.bas b/arch/zx48k/library/template.bas similarity index 100% rename from library/template.bas rename to arch/zx48k/library/template.bas diff --git a/library/ucase.bas b/arch/zx48k/library/ucase.bas similarity index 100% rename from library/ucase.bas rename to arch/zx48k/library/ucase.bas diff --git a/library/winscroll.bas b/arch/zx48k/library/winscroll.bas similarity index 100% rename from library/winscroll.bas rename to arch/zx48k/library/winscroll.bas diff --git a/library/zxuno/uart.bas b/arch/zx48k/library/zxuno/uart.bas similarity index 100% rename from library/zxuno/uart.bas rename to arch/zx48k/library/zxuno/uart.bas diff --git a/libzxbc/zxb.py b/libzxbc/zxb.py index 39bff4556..ea63bf9d6 100755 --- a/libzxbc/zxb.py +++ b/libzxbc/zxb.py @@ -151,6 +151,9 @@ def main(args=None, emitter=None): help='Appends binary to tape file (only works with -t or -T)') parser.add_argument('-N', '--zxnext', action='store_true', help='Enables ZX Next asm extended opcodes') + parser.add_argument('--arch', type=str, default=arch.AVAILABLE_ARCHITECTURES[0], + help=f"Target architecture (defaults is'{arch.AVAILABLE_ARCHITECTURES[0]}'). " + f"Available architectures: {','.join(arch.AVAILABLE_ARCHITECTURES)}") options = parser.parse_args(args=args) @@ -177,6 +180,11 @@ def main(args=None, emitter=None): OPTIONS.headerless.value = options.headerless OPTIONS.zxnext.value = options.zxnext + if options.arch not in arch.AVAILABLE_ARCHITECTURES: + parser.error(f"Invalid architecture '{options.arch}'") + return 2 + OPTIONS.architecture.value = options.arch + OPTIONS.org.value = api.utils.parse_int(options.org) if OPTIONS.org.value is None: parser.error("Invalid --org option '{}'".format(options.org)) diff --git a/libzxbpp/zxbpp.py b/libzxbpp/zxbpp.py index 4c2c53aaa..b95c8ca08 100755 --- a/libzxbpp/zxbpp.py +++ b/libzxbpp/zxbpp.py @@ -29,6 +29,8 @@ from .prepro import DefinesTable, ID, MacroCall, Arg, ArgList from .prepro.exceptions import PreprocError +import arch + OUTPUT = '' INCLUDED = {} # Already included files (with lines) @@ -43,7 +45,7 @@ CURRENT_DIR = None # Default include path -INCLUDEPATH = ('library', 'library-asm') +INCLUDEPATH = ['library', 'library-asm'] # Enabled to FALSE if IFDEF failed ENABLED: bool = True @@ -72,7 +74,6 @@ def init(): global INCLUDED global CURRENT_DIR global ENABLED - global INCLUDEPATH global IFDEFS global ID_TABLE global CURRENT_FILE @@ -82,8 +83,6 @@ def init(): OUTPUT = '' INCLUDED = {} CURRENT_DIR = '' - pwd = get_include_path() - INCLUDEPATH = [os.path.join(pwd, 'library'), os.path.join(pwd, 'library-asm')] ENABLED = True IFDEFS = [] global_.has_errors = 0 @@ -96,7 +95,18 @@ def init(): def get_include_path(): """ Default include path using a tricky sys calls. """ - return os.path.realpath(os.path.join(os.path.dirname(__file__), os.path.pardir)) + return os.path.realpath(os.path.join( + os.path.dirname(__file__), + os.path.pardir, + 'arch', + OPTIONS.architecture.value or '') + ) + + +def set_include_path(): + global INCLUDEPATH + pwd = get_include_path() + INCLUDEPATH = [os.path.join(pwd, 'library'), os.path.join(pwd, 'library-asm')] def setMode(mode): @@ -160,7 +170,7 @@ def include_once(filename, lineno, local_first): Writes down that "filename" was included at the current file, at line . - The file is ignored if it was previuosly included (a warning will + The file is ignored if it was previously included (a warning will be emitted though). If local_first is True, then it will first search the file in the @@ -760,6 +770,7 @@ def main(argv): ENABLED = True OUTPUT = '' + set_include_path() if argv: CURRENT_FILE.append(argv[0]) @@ -816,11 +827,19 @@ def entry_point(args=None): help='Error messages file. Standard error console by default (STDERR)') parser.add_argument('input_file', type=str, default=None, nargs='?', help="File to parse. If not specified, console input will be used (STDIN)") + parser.add_argument('--arch', type=str, default=arch.AVAILABLE_ARCHITECTURES[0], + help=f"Target architecture (defaults is'{arch.AVAILABLE_ARCHITECTURES[0]}'). " + f"Available architectures: {','.join(arch.AVAILABLE_ARCHITECTURES)}") options = parser.parse_args(args=args) OPTIONS.Debug.value = options.debug OPTIONS.debug_zxbpp.value = OPTIONS.Debug.value > 0 + if options.arch not in arch.AVAILABLE_ARCHITECTURES: + parser.error(f"Invalid architecture '{options.arch}'") + return 2 + OPTIONS.architecture.value = options.arch + if options.stderr: OPTIONS.StdErrFileName.value = options.stderr OPTIONS.stderr.value = api.utils.open_file(OPTIONS.StdErrFileName.value, 'wt', 'utf-8') From 6043f1a1af53bf38704f6ffdd4ad31c25c652943 Mon Sep 17 00:00:00 2001 From: Jose Rodriguez Date: Tue, 18 Aug 2020 21:43:19 +0200 Subject: [PATCH 2/3] Update config * Fix tests * Remove unused 'arch' option * Fixes deprecation warnings --- api/config.py | 3 +-- ast_/tree.py | 2 +- libzxbc/zxbparser.py | 2 +- tests/api/test_config.py | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/api/config.py b/api/config.py index 668bf658e..53b8333f2 100644 --- a/api/config.py +++ b/api/config.py @@ -63,13 +63,12 @@ def init(): OPTIONS.add_option('arrayCheck', bool, False) OPTIONS.add_option('enableBreak', bool, False) OPTIONS.add_option('emitBackend', bool, False) - OPTIONS.add_option('arch', str, 'zx48k') OPTIONS.add_option('__DEFINES', dict, {}) OPTIONS.add_option('explicit', bool, False) OPTIONS.add_option('Sinclair', bool, False) OPTIONS.add_option('strict', bool, False) # True to force type checking OPTIONS.add_option('zxnext', bool, False) # True to enable ZX Next ASM opcodes - OPTIONS.add_option('architecture', str) # Architecture + OPTIONS.add_option('architecture', str, None) # Architecture init() diff --git a/ast_/tree.py b/ast_/tree.py index 37c9e4051..059feb3ec 100644 --- a/ast_/tree.py +++ b/ast_/tree.py @@ -92,7 +92,7 @@ def children(self): @children.setter def children(self, value): - assert isinstance(value, collections.Iterable) + assert isinstance(value, collections.abc.Iterable) while len(self.children): self.children.pop() diff --git a/libzxbc/zxbparser.py b/libzxbc/zxbparser.py index 0375310d8..6dd34c2a2 100755 --- a/libzxbc/zxbparser.py +++ b/libzxbc/zxbparser.py @@ -222,7 +222,7 @@ def make_builtin(lineno, fname, operands, func=None, type_=None): assert isinstance(operands, Symbol) or isinstance(operands, tuple) or isinstance(operands, list) # TODO: In the future, builtin functions will be implemented in an external library, like POINT or ATTR __DEBUG__('Creating BUILTIN "{}"'.format(fname), 1) - if not isinstance(operands, collections.Iterable): + if not isinstance(operands, collections.abc.Iterable): operands = [operands] return symbols.BUILTIN.make_node(lineno, fname, func, type_, *operands) diff --git a/tests/api/test_config.py b/tests/api/test_config.py index 8dc0ae760..55d9a9c47 100644 --- a/tests/api/test_config.py +++ b/tests/api/test_config.py @@ -36,7 +36,7 @@ def test_init(self): self.assertEqual(config.OPTIONS.arrayCheck.value, False) self.assertEqual(config.OPTIONS.enableBreak.value, False) self.assertEqual(config.OPTIONS.emitBackend.value, False) - self.assertEqual(config.OPTIONS.arch.value, 'zx48k') + self.assertEqual(config.OPTIONS.architecture.value, None) # private options that cannot be accessed with #pragma self.assertEqual(config.OPTIONS.option('__DEFINES').value, {}) self.assertEqual(config.OPTIONS.explicit.value, False) @@ -49,7 +49,7 @@ def test_initted_values(self): 'Sinclair', 'StdErrFileName', '__DEFINES', - 'arch', + 'architecture', 'arrayCheck', 'array_base', 'autorun', From e12442611bef500d193eed23c711243613cc9d5f Mon Sep 17 00:00:00 2001 From: Jose Rodriguez Date: Tue, 18 Aug 2020 21:46:01 +0200 Subject: [PATCH 3/3] Preprocessor tests updated --- tests/functional/emook0.out | 5 -- tests/functional/prepro00.out | 80 +------------------ tests/functional/prepro01.out | 81 +------------------- tests/functional/prepro02.out | 7 -- tests/functional/prepro03.out | 8 -- tests/functional/prepro04.out | 4 - tests/functional/prepro05.out | 8 -- tests/functional/prepro06.out | 8 -- tests/functional/prepro09.out | 4 - tests/functional/prepro10.out | 3 - tests/functional/prepro11.out | 8 -- tests/functional/prepro12.out | 8 -- tests/functional/prepro13.out | 8 -- tests/functional/prepro14.out | 9 --- tests/functional/prepro15.out | 10 --- tests/functional/prepro16.out | 10 --- tests/functional/prepro17.out | 8 -- tests/functional/prepro18.out | 7 -- tests/functional/prepro19.out | 7 -- tests/functional/prepro20.out | 6 -- tests/functional/prepro21.out | 7 -- tests/functional/prepro23.out | 10 --- tests/functional/prepro24.out | 6 -- tests/functional/prepro25.out | 6 -- tests/functional/prepro26.out | 6 -- tests/functional/prepro27.out | 7 -- tests/functional/prepro29.out | 3 - tests/functional/prepro30.out | 82 +------------------- tests/functional/prepro31.out | 3 - tests/functional/prepro32.out | 5 -- tests/functional/prepro33.out | 6 -- tests/functional/prepro34.out | 3 - tests/functional/prepro36.out | 4 - tests/functional/prepro37.out | 5 -- tests/functional/prepro38.out | 7 -- tests/functional/prepro39.out | 8 -- tests/functional/prepro40.out | 5 -- tests/functional/prepro41.out | 4 - tests/functional/prepro42.out | 3 - tests/functional/prepro43.out | 4 - tests/functional/prepro44.out | 3 - tests/functional/prepro45.out | 5 -- tests/functional/prepro46.out | 6 -- tests/functional/prepro47.out | 6 -- tests/functional/prepro48.out | 6 -- tests/functional/prepro49.out | 6 -- tests/functional/prepro50.out | 8 -- tests/functional/prepro51.out | 5 -- tests/functional/prepro52.out | 6 -- tests/functional/prepro53.out | 6 -- tests/functional/prepro54.out | 4 - tests/functional/prepro55.out | 5 -- tests/functional/prepro56.out | 4 - tests/functional/prepro57.out | 4 - tests/functional/prepro58.out | 1 - tests/functional/prepro59.out | 4 - tests/functional/prepro60.out | 1 - tests/functional/prepro70.out | 5 -- tests/functional/prepro71.out | 139 +--------------------------------- tests/functional/prepro72.out | 5 -- tests/functional/prepro73.out | 54 +------------ tests/functional/prepro74.out | 43 +---------- tests/functional/prepro75.out | 4 - tests/functional/prepro77.out | 2 - tests/functional/prepro80.out | 6 -- tests/functional/spectrum.out | 4 - 66 files changed, 14 insertions(+), 801 deletions(-) diff --git a/tests/functional/emook0.out b/tests/functional/emook0.out index 7fb90e2bb..9fdc31ec5 100644 --- a/tests/functional/emook0.out +++ b/tests/functional/emook0.out @@ -1,11 +1,6 @@ #line 1 "emook0.bi" - - ASM - LD A,A LD BC,254 #line 6 - end Asm - diff --git a/tests/functional/prepro00.out b/tests/functional/prepro00.out index 14b102805..d15fb570c 100644 --- a/tests/functional/prepro00.out +++ b/tests/functional/prepro00.out @@ -1,104 +1,38 @@ #line 1 "prepro00.bi" -#line 1 "/zxbasic/library/attr.bas" - - - - - - - - - - - - - +#line 1 "/zxbasic/arch/zx48k/library/attr.bas" #pragma push(case_insensitive) #pragma case_insensitive = TRUE - - - - - - - - - - - function attr(byval row as ubyte, byval col as ubyte) as ubyte asm - PROC LOCAL __ATTR_END - ld e, (ix+7) ld d, (ix+5) - - call __IN_SCREEN jr nc, __ATTR_END - call __ATTR_ADDR ld a, (hl) - __ATTR_END: ENDP - end asm - end function - - - - - - - - - - - - - - sub setattr(byval row as ubyte, byval col as ubyte, byval value as ubyte) asm - PROC LOCAL __ATTR_END - ld e, (ix+7) ld d, (ix+5) - - call __IN_SCREEN jr nc, __ATTR_END - call __ATTR_ADDR ld a, (ix+9) ld (hl), a - __ATTR_END: ENDP - end asm - end sub - - - - - - - - - - - function fastcall attraddr(byval row as ubyte, byval col as ubyte) as uinteger asm - pop hl ex (sp), hl ld d, a @@ -106,19 +40,9 @@ function fastcall attraddr(byval row as ubyte, byval col as ubyte) as uinteger jp __ATTR_ADDR end asm end function - - - #pragma pop(case_insensitive) - - #require "attr.asm" - - #require "in_screen.asm" - -#line 119 "/zxbasic/library/attr.bas" - +#line 119 "/zxbasic/arch/zx48k/library/attr.bas" #line 2 "prepro00.bi" PRINT "HELLO" - diff --git a/tests/functional/prepro01.out b/tests/functional/prepro01.out index 9e9f224e7..02a24cf05 100644 --- a/tests/functional/prepro01.out +++ b/tests/functional/prepro01.out @@ -1,104 +1,38 @@ #line 1 "prepro01.bi" -#line 1 "/zxbasic/library/attr.bas" - - - - - - - - - - - - - +#line 1 "/zxbasic/arch/zx48k/library/attr.bas" #pragma push(case_insensitive) #pragma case_insensitive = TRUE - - - - - - - - - - - function attr(byval row as ubyte, byval col as ubyte) as ubyte asm - PROC LOCAL __ATTR_END - ld e, (ix+7) ld d, (ix+5) - - call __IN_SCREEN jr nc, __ATTR_END - call __ATTR_ADDR ld a, (hl) - __ATTR_END: ENDP - end asm - end function - - - - - - - - - - - - - - sub setattr(byval row as ubyte, byval col as ubyte, byval value as ubyte) asm - PROC LOCAL __ATTR_END - ld e, (ix+7) ld d, (ix+5) - - call __IN_SCREEN jr nc, __ATTR_END - call __ATTR_ADDR ld a, (ix+9) ld (hl), a - __ATTR_END: ENDP - end asm - end sub - - - - - - - - - - - function fastcall attraddr(byval row as ubyte, byval col as ubyte) as uinteger asm - pop hl ex (sp), hl ld d, a @@ -106,20 +40,9 @@ function fastcall attraddr(byval row as ubyte, byval col as ubyte) as uinteger jp __ATTR_ADDR end asm end function - - - #pragma pop(case_insensitive) - - #require "attr.asm" - - #require "in_screen.asm" - -#line 119 "/zxbasic/library/attr.bas" - +#line 119 "/zxbasic/arch/zx48k/library/attr.bas" #line 2 "prepro01.bi" - PRINT "HOLA" - diff --git a/tests/functional/prepro02.out b/tests/functional/prepro02.out index 998c05f24..11ef53d61 100644 --- a/tests/functional/prepro02.out +++ b/tests/functional/prepro02.out @@ -1,9 +1,2 @@ #line 1 "prepro02.bi" - - - - #line 6 "prepro02.bi" - - - diff --git a/tests/functional/prepro03.out b/tests/functional/prepro03.out index ed35a2194..d9ca7e437 100644 --- a/tests/functional/prepro03.out +++ b/tests/functional/prepro03.out @@ -1,11 +1,3 @@ #line 1 "prepro03.bi" - - - - x y - - - - diff --git a/tests/functional/prepro04.out b/tests/functional/prepro04.out index a9b5f342c..24f5f26d5 100644 --- a/tests/functional/prepro04.out +++ b/tests/functional/prepro04.out @@ -1,7 +1,3 @@ #line 1 "prepro04.bi" - #line 5 "prepro04.bi" - #line 7 "prepro04.bi" - - diff --git a/tests/functional/prepro05.out b/tests/functional/prepro05.out index 67e092110..9c2516264 100644 --- a/tests/functional/prepro05.out +++ b/tests/functional/prepro05.out @@ -1,11 +1,3 @@ #line 1 "prepro05.bi" - - - - y test2 - - - - diff --git a/tests/functional/prepro06.out b/tests/functional/prepro06.out index de861da4f..47e97ccba 100644 --- a/tests/functional/prepro06.out +++ b/tests/functional/prepro06.out @@ -1,10 +1,2 @@ #line 1 "prepro06.bi" - - - - func () - - - - diff --git a/tests/functional/prepro09.out b/tests/functional/prepro09.out index d77b6f49a..105b451a9 100644 --- a/tests/functional/prepro09.out +++ b/tests/functional/prepro09.out @@ -1,5 +1 @@ #line 1 "prepro09.bi" - - - - diff --git a/tests/functional/prepro10.out b/tests/functional/prepro10.out index dbca9aa93..c46d4df7d 100644 --- a/tests/functional/prepro10.out +++ b/tests/functional/prepro10.out @@ -1,7 +1,4 @@ #line 1 "prepro10.bi" - - function test(byval a as byte) let test = 0 end function - diff --git a/tests/functional/prepro11.out b/tests/functional/prepro11.out index 6b285bf5e..cfab134e5 100644 --- a/tests/functional/prepro11.out +++ b/tests/functional/prepro11.out @@ -1,10 +1,2 @@ #line 1 "prepro11.bi" - - - - - - PRINT "HELLO WORLD" - - diff --git a/tests/functional/prepro12.out b/tests/functional/prepro12.out index be40bb7e3..439c87300 100644 --- a/tests/functional/prepro12.out +++ b/tests/functional/prepro12.out @@ -1,10 +1,2 @@ #line 1 "prepro12.bi" - - - - - - )PRINT "HELLO WORLD" - - diff --git a/tests/functional/prepro13.out b/tests/functional/prepro13.out index abc3eae6c..fc47d6aad 100644 --- a/tests/functional/prepro13.out +++ b/tests/functional/prepro13.out @@ -1,10 +1,2 @@ #line 1 "prepro13.bi" - - - - - - PRINT "HELLO WORLD" - - diff --git a/tests/functional/prepro14.out b/tests/functional/prepro14.out index c461971d2..3da85cf2d 100644 --- a/tests/functional/prepro14.out +++ b/tests/functional/prepro14.out @@ -1,11 +1,2 @@ #line 1 "prepro14.bi" - - - - - - - PRINT "HELLO WORLD" - - diff --git a/tests/functional/prepro15.out b/tests/functional/prepro15.out index 13d6a5a08..cad8432e2 100644 --- a/tests/functional/prepro15.out +++ b/tests/functional/prepro15.out @@ -1,14 +1,4 @@ #line 1 "prepro15.bi" - - - - - - - - PRINT 10; PRINT "Hello"; macro - - diff --git a/tests/functional/prepro16.out b/tests/functional/prepro16.out index 185f08a7b..ccdc18474 100644 --- a/tests/functional/prepro16.out +++ b/tests/functional/prepro16.out @@ -1,13 +1,3 @@ #line 1 "prepro16.bi" - - - - - - - - PRINT 20; PRINT 10 + 20; - - diff --git a/tests/functional/prepro17.out b/tests/functional/prepro17.out index 129f6d3a3..f4d9c8e99 100644 --- a/tests/functional/prepro17.out +++ b/tests/functional/prepro17.out @@ -1,10 +1,2 @@ #line 1 "prepro17.bi" - - - - - - PRINT PRINT PRINT 10;;; - - diff --git a/tests/functional/prepro18.out b/tests/functional/prepro18.out index 403b30cf8..ce12121d0 100644 --- a/tests/functional/prepro18.out +++ b/tests/functional/prepro18.out @@ -1,9 +1,2 @@ #line 1 "prepro18.bi" - - - - - PRINT (10, 20); - - diff --git a/tests/functional/prepro19.out b/tests/functional/prepro19.out index 42d912f48..1040df65b 100644 --- a/tests/functional/prepro19.out +++ b/tests/functional/prepro19.out @@ -1,9 +1,2 @@ #line 1 "prepro19.bi" - - - - - PRINT (10 + PRINT 20;); - - diff --git a/tests/functional/prepro20.out b/tests/functional/prepro20.out index 57691fbcf..5f297839a 100644 --- a/tests/functional/prepro20.out +++ b/tests/functional/prepro20.out @@ -1,8 +1,2 @@ #line 1 "prepro20.bi" - - - - - PRINT ;) - diff --git a/tests/functional/prepro21.out b/tests/functional/prepro21.out index d8daf7ce4..32cc7ca15 100644 --- a/tests/functional/prepro21.out +++ b/tests/functional/prepro21.out @@ -1,9 +1,2 @@ #line 1 "prepro21.bi" - - - - - - 10 - diff --git a/tests/functional/prepro23.out b/tests/functional/prepro23.out index c697ba14b..9cdb75d82 100644 --- a/tests/functional/prepro23.out +++ b/tests/functional/prepro23.out @@ -1,12 +1,2 @@ #line 1 "prepro23.bi" - - - - - - - PRINT 10; - - - diff --git a/tests/functional/prepro24.out b/tests/functional/prepro24.out index 13ff4bcc5..faa571044 100644 --- a/tests/functional/prepro24.out +++ b/tests/functional/prepro24.out @@ -1,12 +1,6 @@ #line 1 "prepro24.bi" - - - - - FOR xxx = 1 TO 10 PRINT xxx NEXT #line 8 - PRINT "Line 9" diff --git a/tests/functional/prepro25.out b/tests/functional/prepro25.out index aa904e121..deb08d882 100644 --- a/tests/functional/prepro25.out +++ b/tests/functional/prepro25.out @@ -1,8 +1,2 @@ #line 1 "prepro25.bi" - - - - - (x + y) * 2 - diff --git a/tests/functional/prepro26.out b/tests/functional/prepro26.out index ff180c860..078f8ad8d 100644 --- a/tests/functional/prepro26.out +++ b/tests/functional/prepro26.out @@ -1,8 +1,2 @@ #line 1 "prepro26.bi" - - - - - (x + y) + 4 * 2 - diff --git a/tests/functional/prepro27.out b/tests/functional/prepro27.out index bd5102d7e..89b8ce1f6 100644 --- a/tests/functional/prepro27.out +++ b/tests/functional/prepro27.out @@ -1,16 +1,9 @@ #line 1 "prepro27.bi" Sub x End Sub - - - - #line 1 "prepro27.bi" Sub x End Sub - #line 9 "prepro27.bi" - #line 8 "prepro27.bi" #line 9 "prepro27.bi" - diff --git a/tests/functional/prepro29.out b/tests/functional/prepro29.out index 37ed1129d..e078f4c9d 100644 --- a/tests/functional/prepro29.out +++ b/tests/functional/prepro29.out @@ -1,5 +1,2 @@ #line 1 "prepro29.bi" - - ZZ - diff --git a/tests/functional/prepro30.out b/tests/functional/prepro30.out index 0a790d932..764e0a340 100644 --- a/tests/functional/prepro30.out +++ b/tests/functional/prepro30.out @@ -1,104 +1,38 @@ #line 1 "prepro30.bi" -#line 1 "/zxbasic/library/attr.bas" - - - - - - - - - - - - - +#line 1 "/zxbasic/arch/zx48k/library/attr.bas" #pragma push(case_insensitive) #pragma case_insensitive = TRUE - - - - - - - - - - - function attr(byval row as ubyte, byval col as ubyte) as ubyte asm - PROC LOCAL __ATTR_END - ld e, (ix+7) ld d, (ix+5) - - call __IN_SCREEN jr nc, __ATTR_END - call __ATTR_ADDR ld a, (hl) - __ATTR_END: ENDP - end asm - end function - - - - - - - - - - - - - - sub setattr(byval row as ubyte, byval col as ubyte, byval value as ubyte) asm - PROC LOCAL __ATTR_END - ld e, (ix+7) ld d, (ix+5) - - call __IN_SCREEN jr nc, __ATTR_END - call __ATTR_ADDR ld a, (ix+9) ld (hl), a - __ATTR_END: ENDP - end asm - end sub - - - - - - - - - - - function fastcall attraddr(byval row as ubyte, byval col as ubyte) as uinteger asm - pop hl ex (sp), hl ld d, a @@ -106,20 +40,8 @@ function fastcall attraddr(byval row as ubyte, byval col as ubyte) as uinteger jp __ATTR_ADDR end asm end function - - - #pragma pop(case_insensitive) - - #require "attr.asm" - - #require "in_screen.asm" - -#line 119 "/zxbasic/library/attr.bas" - +#line 119 "/zxbasic/arch/zx48k/library/attr.bas" #line 2 "prepro30.bi" - - - diff --git a/tests/functional/prepro31.out b/tests/functional/prepro31.out index 31a875b21..f026d4646 100644 --- a/tests/functional/prepro31.out +++ b/tests/functional/prepro31.out @@ -1,5 +1,2 @@ #line 1 "prepro31.bi" - - t(x, (y - 1)) - diff --git a/tests/functional/prepro32.out b/tests/functional/prepro32.out index 1f6019f12..0cbce80d6 100644 --- a/tests/functional/prepro32.out +++ b/tests/functional/prepro32.out @@ -1,14 +1,9 @@ #line 1 "prepro32.bi" DIM a As Ubyte = 1 - - - PRINT "HELLO WORLD" - PRINT a; " MACRO START" ASM ld hl, _a inc (hl) END ASM PRINT a; " MACRO END" - diff --git a/tests/functional/prepro33.out b/tests/functional/prepro33.out index b25449678..6b4d12e37 100644 --- a/tests/functional/prepro33.out +++ b/tests/functional/prepro33.out @@ -2,7 +2,6 @@ asm EX DE,HL PUSH DE - LD L,(IX+8) LD H,(IX+9) EX AF,AF' @@ -10,12 +9,9 @@ asm EX AF,AF' BLPutCharLoop: LD B,8 - BLPutCharOneCharLoop: XOR A LD C,A - - LDI LDI LDI @@ -27,10 +23,8 @@ asm LD A,B OR A JP NZ,BLPutCharOneCharLoop - EX AF,AF' DEC A JR Z, BLPutCharsEnd EX AF,AF' end asm - diff --git a/tests/functional/prepro34.out b/tests/functional/prepro34.out index 28a371b7a..473497e35 100644 --- a/tests/functional/prepro34.out +++ b/tests/functional/prepro34.out @@ -1,6 +1,3 @@ #line 1 "prepro34.bi" - - LET a = _ 5 - diff --git a/tests/functional/prepro36.out b/tests/functional/prepro36.out index da1d63b02..d2e17a3ee 100644 --- a/tests/functional/prepro36.out +++ b/tests/functional/prepro36.out @@ -1,5 +1 @@ #line 1 "prepro36.bi" - - - - diff --git a/tests/functional/prepro37.out b/tests/functional/prepro37.out index b962b5c3c..b570099eb 100644 --- a/tests/functional/prepro37.out +++ b/tests/functional/prepro37.out @@ -1,7 +1,2 @@ #line 1 "prepro37.bi" - - - - PRINT - diff --git a/tests/functional/prepro38.out b/tests/functional/prepro38.out index b227c34cb..7c34ce715 100644 --- a/tests/functional/prepro38.out +++ b/tests/functional/prepro38.out @@ -1,10 +1,3 @@ #line 1 "prepro38.bi" - - - - Test #line 5 - - - diff --git a/tests/functional/prepro39.out b/tests/functional/prepro39.out index e4c287756..164e5b8c0 100644 --- a/tests/functional/prepro39.out +++ b/tests/functional/prepro39.out @@ -1,11 +1,3 @@ #line 1 "prepro39.bi" - - - - - - PRINT , #line 7 - - diff --git a/tests/functional/prepro40.out b/tests/functional/prepro40.out index 4b6cc78c4..340b5df7c 100644 --- a/tests/functional/prepro40.out +++ b/tests/functional/prepro40.out @@ -1,7 +1,2 @@ #line 1 "prepro40.bi" - - macro - - - diff --git a/tests/functional/prepro41.out b/tests/functional/prepro41.out index 74912b1dc..857abad22 100644 --- a/tests/functional/prepro41.out +++ b/tests/functional/prepro41.out @@ -1,11 +1,7 @@ #line 1 "prepro41.bi" - - 10 PAUSE 0 : asm call 65012 end asm #line 6 : PAUSE 0 - - diff --git a/tests/functional/prepro42.out b/tests/functional/prepro42.out index b57f94be1..29fdf4552 100644 --- a/tests/functional/prepro42.out +++ b/tests/functional/prepro42.out @@ -1,5 +1,2 @@ #line 1 "prepro42.bi" - - #line 6 "prepro42.bi" - diff --git a/tests/functional/prepro43.out b/tests/functional/prepro43.out index d3c43be47..2033ac32a 100644 --- a/tests/functional/prepro43.out +++ b/tests/functional/prepro43.out @@ -1,7 +1,3 @@ #line 1 "prepro43.bi" - - - print 1 #line 6 "prepro43.bi" - diff --git a/tests/functional/prepro44.out b/tests/functional/prepro44.out index 4153f31d7..30b057889 100644 --- a/tests/functional/prepro44.out +++ b/tests/functional/prepro44.out @@ -1,5 +1,2 @@ #line 1 "prepro44.bi" - - #line 6 "prepro44.bi" - diff --git a/tests/functional/prepro45.out b/tests/functional/prepro45.out index 91c362dee..313e31fef 100644 --- a/tests/functional/prepro45.out +++ b/tests/functional/prepro45.out @@ -1,7 +1,2 @@ #line 1 "prepro45.bi" - - #line 7 "prepro45.bi" - - - diff --git a/tests/functional/prepro46.out b/tests/functional/prepro46.out index 15b58f4aa..8693272c7 100644 --- a/tests/functional/prepro46.out +++ b/tests/functional/prepro46.out @@ -1,9 +1,3 @@ #line 1 "prepro46.bi" - - - print 1 #line 6 "prepro46.bi" - - - diff --git a/tests/functional/prepro47.out b/tests/functional/prepro47.out index 01fea5359..99fd6d87d 100644 --- a/tests/functional/prepro47.out +++ b/tests/functional/prepro47.out @@ -1,8 +1,2 @@ #line 1 "prepro47.bi" - - - #line 8 "prepro47.bi" - - - diff --git a/tests/functional/prepro48.out b/tests/functional/prepro48.out index 863c0447c..2e89604c4 100644 --- a/tests/functional/prepro48.out +++ b/tests/functional/prepro48.out @@ -1,8 +1,2 @@ #line 1 "prepro48.bi" - - - #line 8 "prepro48.bi" - - - diff --git a/tests/functional/prepro49.out b/tests/functional/prepro49.out index eda1b6ad8..103298123 100644 --- a/tests/functional/prepro49.out +++ b/tests/functional/prepro49.out @@ -1,8 +1,2 @@ #line 1 "prepro49.bi" - - - #line 8 "prepro49.bi" - - - diff --git a/tests/functional/prepro50.out b/tests/functional/prepro50.out index 5c0098549..28371815e 100644 --- a/tests/functional/prepro50.out +++ b/tests/functional/prepro50.out @@ -1,11 +1,3 @@ #line 1 "prepro50.bi" - - - - print 1 - #line 8 "prepro50.bi" - - - diff --git a/tests/functional/prepro51.out b/tests/functional/prepro51.out index 92e5aef07..476a3c30a 100644 --- a/tests/functional/prepro51.out +++ b/tests/functional/prepro51.out @@ -1,7 +1,2 @@ #line 1 "prepro51.bi" - - A(1) - - - diff --git a/tests/functional/prepro52.out b/tests/functional/prepro52.out index 60d64adf6..e22b37138 100644 --- a/tests/functional/prepro52.out +++ b/tests/functional/prepro52.out @@ -1,8 +1,2 @@ #line 1 "prepro52.bi" - - - 1 - - - diff --git a/tests/functional/prepro53.out b/tests/functional/prepro53.out index 52bcd64a4..c054a9abe 100644 --- a/tests/functional/prepro53.out +++ b/tests/functional/prepro53.out @@ -1,8 +1,2 @@ #line 1 "prepro53.bi" - - - 1 - - - diff --git a/tests/functional/prepro54.out b/tests/functional/prepro54.out index 699a7ae28..382562fdb 100644 --- a/tests/functional/prepro54.out +++ b/tests/functional/prepro54.out @@ -1,6 +1,2 @@ #line 1 "prepro54.bi" - - - #line 7 "prepro54.bi" - diff --git a/tests/functional/prepro55.out b/tests/functional/prepro55.out index f7e46dbba..a4e62a750 100644 --- a/tests/functional/prepro55.out +++ b/tests/functional/prepro55.out @@ -1,8 +1,3 @@ #line 1 "prepro55.bi" - - - - ok #line 7 "prepro55.bi" - diff --git a/tests/functional/prepro56.out b/tests/functional/prepro56.out index 59c43aa68..7c714c6c4 100644 --- a/tests/functional/prepro56.out +++ b/tests/functional/prepro56.out @@ -1,6 +1,2 @@ #line 1 "prepro56.bi" - - - #line 7 "prepro56.bi" - diff --git a/tests/functional/prepro57.out b/tests/functional/prepro57.out index 0892b25e4..a5a5a8cd9 100644 --- a/tests/functional/prepro57.out +++ b/tests/functional/prepro57.out @@ -1,7 +1,3 @@ #line 1 "prepro57.bi" - - PRINT "LANG = es" #line 5 "prepro57.bi" - - diff --git a/tests/functional/prepro58.out b/tests/functional/prepro58.out index b6af41f9b..0d224895e 100644 --- a/tests/functional/prepro58.out +++ b/tests/functional/prepro58.out @@ -4,4 +4,3 @@ sub test() ex af,af' end asm end sub - diff --git a/tests/functional/prepro59.out b/tests/functional/prepro59.out index f8add46e0..2ef4180fc 100644 --- a/tests/functional/prepro59.out +++ b/tests/functional/prepro59.out @@ -1,6 +1,2 @@ #line 1 "prepro59.bi" - - - LET a$ = (a$ + CHR$(0)) - diff --git a/tests/functional/prepro60.out b/tests/functional/prepro60.out index ac7a8c690..61330109f 100644 --- a/tests/functional/prepro60.out +++ b/tests/functional/prepro60.out @@ -3,4 +3,3 @@ Function FASTCALL ESXDOSWrite(ByVal handle as Byte, _ ByVal buffer as UInteger, _ ByVal nbytes as UInteger) as Uinteger End Function - diff --git a/tests/functional/prepro70.out b/tests/functional/prepro70.out index 599230c43..7fdc95ef2 100644 --- a/tests/functional/prepro70.out +++ b/tests/functional/prepro70.out @@ -1,13 +1,8 @@ #line 1 "prepro70.bi" DIM b - - - #line 1 "./prepro70.bi" DIM b #line 10 "./prepro70.bi" #line 6 "prepro70.bi" - DIM a - #line 10 "prepro70.bi" diff --git a/tests/functional/prepro71.out b/tests/functional/prepro71.out index 6f6e1676f..130af6316 100644 --- a/tests/functional/prepro71.out +++ b/tests/functional/prepro71.out @@ -1,112 +1,27 @@ #line 1 "prepro71.bi" -#line 1 "/zxbasic/library/alloc.bas" - - - - - - - - - - - - - +#line 1 "/zxbasic/arch/zx48k/library/alloc.bas" #pragma push(case_insensitive) #pragma case_insensitive = True - - - - - - - - - - - - - - - function FASTCALL allocate(byval n as uinteger) as uinteger - - - - asm ld b, h ld c, l jp __MEM_ALLOC end asm end function - - - - - - - - - - - - - - - - - function FASTCALL callocate(byval n as uinteger) as uinteger - - - - asm ld b, h ld c, l jp __MEM_CALLOC end asm end function - - - - - - - - sub FASTCALL deallocate(byval addr as integer) - - - asm jp __MEM_FREE end asm end sub - - - - - - - - - - - - - - - - function FASTCALL reallocate(byval addr as uinteger, byval n as uinteger) as uinteger - - - - - asm ex de, hl pop hl @@ -117,117 +32,67 @@ function FASTCALL reallocate(byval addr as uinteger, byval n as uinteger) as uin jp __REALLOC end asm end function - - - - - - - - function FASTCALL memavail as uInteger asm PROC - LOCAL LOOP - ld hl, ZXBASIC_MEM_HEAP ld de, 0 - LOOP: - ld c, (hl) inc hl ld b, (hl) inc hl - - ld a, (hl) inc hl ld h, (hl) ld l, a - - ex de, hl add hl, bc ex de, hl - - ld a, h or l jr nz, LOOP - ex de, hl - ENDP end asm end function - - - - - - - function FASTCALL maxavail as uInteger asm PROC - LOCAL LOOP, CONT - ld hl, ZXBASIC_MEM_HEAP ld de, 0 - LOOP: - ld c, (hl) inc hl ld b, (hl) inc hl - - ld a, (hl) inc hl ld h, (hl) ld l, a - - - ex de, hl or a sbc hl, bc add hl, bc ex de, hl - - jr nc, CONT - ld d, b ld e, c - CONT: - ld a, h or l jr nz, LOOP - ex de, hl - ENDP end asm end function - - #pragma pop(case_insensitive) - #require "alloc.asm" #require "free.asm" #require "realloc.asm" #require "calloc.asm" - -#line 227 "/zxbasic/library/alloc.bas" - +#line 227 "/zxbasic/arch/zx48k/library/alloc.bas" #line 2 "prepro71.bi" - PRINT "HOLA" - diff --git a/tests/functional/prepro72.out b/tests/functional/prepro72.out index 3ba0b5f2a..22c26abd7 100644 --- a/tests/functional/prepro72.out +++ b/tests/functional/prepro72.out @@ -1,13 +1,8 @@ #line 1 "prepro72.bi" DIM b - - - #line 1 "./prepro70.bi" DIM b #line 10 "./prepro70.bi" #line 6 "prepro72.bi" - DIM a - #line 10 "prepro72.bi" diff --git a/tests/functional/prepro73.out b/tests/functional/prepro73.out index cebee6bb2..36d873f2e 100644 --- a/tests/functional/prepro73.out +++ b/tests/functional/prepro73.out @@ -1,69 +1,23 @@ #line 1 "prepro73.bi" -#line 1 "/zxbasic/library/pos.bas" - - - - - - - - - - - - - - - +#line 1 "/zxbasic/arch/zx48k/library/pos.bas" #pragma push(case_insensitive) #pragma case_insensitive = true - - - - - - - - - function FASTCALL pos as ubyte asm PROC - call __LOAD_S_POSN ld a, e - ENDP end asm end function - #pragma pop(case_insensitive) #require "sposn.asm" - - -#line 43 "/zxbasic/library/pos.bas" - +#line 43 "/zxbasic/arch/zx48k/library/pos.bas" #line 2 "prepro73.bi" - - - #line 1 "prepro73.bi" -#line 1 "/zxbasic/library/pos.bas" - - - - - - - - - -#line 43 "/zxbasic/library/pos.bas" - +#line 1 "/zxbasic/arch/zx48k/library/pos.bas" +#line 43 "/zxbasic/arch/zx48k/library/pos.bas" #line 2 "prepro73.bi" - #line 7 "prepro73.bi" - #line 6 "prepro73.bi" #line 7 "prepro73.bi" - diff --git a/tests/functional/prepro74.out b/tests/functional/prepro74.out index ec4a5d1a3..0dc953aa6 100644 --- a/tests/functional/prepro74.out +++ b/tests/functional/prepro74.out @@ -1,61 +1,22 @@ #line 1 "prepro74.bi" -#line 1 "/zxbasic/library/pos.bas" - - - - - - - - - - - - - - - +#line 1 "/zxbasic/arch/zx48k/library/pos.bas" #pragma push(case_insensitive) #pragma case_insensitive = true - - - - - - - - - function FASTCALL pos as ubyte asm PROC - call __LOAD_S_POSN ld a, e - ENDP end asm end function - #pragma pop(case_insensitive) #require "sposn.asm" - - -#line 43 "/zxbasic/library/pos.bas" - +#line 43 "/zxbasic/arch/zx48k/library/pos.bas" #line 2 "prepro74.bi" - - - #line 1 "prepro74.bi" - - #line 7 "prepro74.bi" - glibberish - #line 6 "prepro74.bi" #line 7 "prepro74.bi" - glibberish - diff --git a/tests/functional/prepro75.out b/tests/functional/prepro75.out index cb2ba7e75..111fd0258 100644 --- a/tests/functional/prepro75.out +++ b/tests/functional/prepro75.out @@ -1,11 +1,7 @@ #line 1 "prepro75.bi" A = 0 - - #line 1 "prepro75.bi" A = 0 #line 6 "prepro75.bi" - #line 5 "prepro75.bi" #line 6 "prepro75.bi" - diff --git a/tests/functional/prepro77.out b/tests/functional/prepro77.out index 252ff806c..ad999c91a 100644 --- a/tests/functional/prepro77.out +++ b/tests/functional/prepro77.out @@ -1,3 +1 @@ #line 1 "prepro77.bi" - - diff --git a/tests/functional/prepro80.out b/tests/functional/prepro80.out index c2855c979..5d24a8f32 100644 --- a/tests/functional/prepro80.out +++ b/tests/functional/prepro80.out @@ -1,12 +1,6 @@ #line 1 "prepro80.bi" - - - - asm halt halt end asm - #line 11 "prepro80.bi" - diff --git a/tests/functional/spectrum.out b/tests/functional/spectrum.out index cb29e0f0f..f777aac37 100644 --- a/tests/functional/spectrum.out +++ b/tests/functional/spectrum.out @@ -1,6 +1,2 @@ #line 1 "spectrum.bi" - - - PRINT "HELLO WORLD!" -