tebe6502 / Mad-Pascal

Mad Pascal Compiler for 6502 (Atari XE/XL, C64, C4Plus, Neo6502)
122 stars 20 forks source link

sin - compile problem #156

Closed zbyti closed 5 months ago

zbyti commented 5 months ago
program test;
var x: float;

begin
    x := 42;
    x := sin(x);
    repeat until false;
end.

A8

Mad Pascal Compiler version 1.7.1 [2024/06/30] for MOS 6502 CPU
Compiling main.pas
An unhandled exception occurred at $00000000004CAEA2:
                                                     EAccessViolation: Access violation
                                                                                         $00000000004CAEA2

                                                                                                          ZPAGE: $0080..
$00D3
RTBUF: $0400..$04FF
RTLIB: $2000..$1FFF
        STATICDATA
main.a65 (112) ERROR: Undeclared macro STATICDATA (BANK=0)
bltCop          .long MAIN.SYSTEM.VBXE_MAPADR+256       ; source address
vbxeput.asm (97) ERROR: Undeclared label MAIN.SYSTEM.VBXE_MAPADR (BANK=0)
                .long MAIN.SYSTEM.VBXE_MAPADR           ; destination address
vbxeput.asm (100) ERROR: Undeclared label MAIN.SYSTEM.VBXE_MAPADR (BANK=0)
bltCop          .long MAIN.SYSTEM.VBXE_OVRADR+160       ; source address
vbxescroll.asm (54) ERROR: Undeclared label MAIN.SYSTEM.VBXE_OVRADR (BANK=0)
                .long MAIN.SYSTEM.VBXE_OVRADR           ; destination address
vbxescroll.asm (57) ERROR: Undeclared label MAIN.SYSTEM.VBXE_OVRADR (BANK=0)
        stx MAIN.@halt+1
main.a65 (129) ERROR: Undeclared label MAIN.@HALT (BANK=0)
VLEN    = VARDATASIZE-VARINITSIZE
main.a65 (135) ERROR: Undeclared label VARDATASIZE (BANK=0)
VADR    = DATAORIGIN+VARINITSIZE
main.a65 (136) ERROR: Undeclared label DATAORIGIN (BANK=0)
        ift (VADR > $BFFF) && .not(.def MAIN.@DEFINES.ROMOFF)
main.a65 (138) ERROR: The referenced label VADR has not previously been defined properly
        ift (VLEN > 0) && (VLEN <= 256)
main.a65 (142) ERROR: The referenced label VLEN has not previously been defined properly
        eli VLEN>256
main.a65 (146) ERROR: The referenced label VLEN has not previously been defined properly

Neo6502

Mad Pascal Compiler version 1.7.1 [2024/06/30] for MOS 6502 CPU
Compiling main.pas
An unhandled exception occurred at $00000000004CAEA2:
                                                     EAccessViolation: Access violation
                                                                                         $00000000004CAEA2

                                                                                                          ZPAGE: $0000..
$0053
RTBUF: $0200..$02FF
RTLIB: $1003..$1002
; -----------------------------------------------------------
main.a65 (143) ERROR: Missing .ENDL
        STATICDATA
main.a65 (94) ERROR: Undeclared macro STATICDATA (BANK=0)
        stx MAIN.@halt+1
main.a65 (111) ERROR: Undeclared label MAIN.@HALT (BANK=0)
VLEN    = VARDATASIZE-VARINITSIZE
main.a65 (113) ERROR: Undeclared label VARDATASIZE (BANK=0)
VADR    = DATAORIGIN+VARINITSIZE
main.a65 (114) ERROR: Undeclared label DATAORIGIN (BANK=0)
        ift (VLEN > 0) && (VLEN <= 256)
main.a65 (116) ERROR: The referenced label VLEN has not previously been defined properly
        eli VLEN>256
main.a65 (120) ERROR: The referenced label VLEN has not previously been defined properly
        UNITINITIALIZATION
main.a65 (137) ERROR: Undeclared macro UNITINITIALIZATION (BANK=0)
        jmp l_0004
main.a65 (141) ERROR: Undeclared label L_0004 (BANK=0)
tebe6502 commented 5 months ago

fixed

https://github.com/tebe6502/Mad-Pascal/commit/063c3998c46b634dda2cf536930b4c36c3f41832

zbyti commented 5 months ago

works, thx