Jump to content

pvaWatson

New Members
  • Posts

    4
  • Joined

  • Last visited

pvaWatson's Achievements

Combat Commando

Combat Commando (1/9)

0

Reputation

  1. Ok! Thanks for the answer. I will do so. I thought that maybe there is a more beautiful solution, but if not, then no.
  2. Hello. The MADPascal compiler removes unused procedures without checking their use in assembler inserts. For example: program TestProject; procedure TestProc; var a: Byte; begin a:= 10; end; begin // TestProc; asm { jsr TestProc }; end. mp generates note: "Note: Local proc 'TESTPROC' not used" and mads generates error: "TestProject.a65 (185) ERROR: Undeclared label TESTPROC (BANK=0)", but if you uncomment the call to the TestProc procedure, then mads compiler will be successful. Is there any way around this problem? And another question: will the procedural type be implemented in MADPascal in the future?
  3. Thank! Everything works correctly! ?
  4. Hey. Thanks to the developers of MAD Pascal! I found out that there are problems in working with pointers. For example: program TestProgram; var PA, PB: ^Word; begin PA: = Pointer($1111); PB: = @PA; // Error: PB = PA {=$1111}, but should be PB = Addr(PA) end. Similarly, the problem is when calling a procedure with a var parameter pointer: program TestProgram; procedure Tst(var P:Pointer); var TP: Pointer; begin TP:= Pointer(Word(P) + $123); //Error: TP <> ($1111+$0123) since in this case "Word (P)" is executed as "Word (P ^)" P:= TP; end; var PA, PB: Pointer; PC: Pointer; begin PA:= Pointer($1111); PC:= PA; Tst(PC); //Error: PC = PA {$1111}, but should be PC = $1234 PB:= PC; end. If the type "pointer" is replaced by a "word", then the program runs correctly.
×
×
  • Create New...