News:

Let's find out together what makes a PIC Tick!

Main Menu

Assembler error

Started by John Drew, Mar 26, 2024, 01:09 AM

Previous topic - Next topic

John Drew

Hello all,
I'm trying to compile an old 2017 program (It drives a si5351 synthesiser chip) and I receive the following Assembler error.

X ASM ERROR:Error[113] D:\Proton source\FREQ SYNTHESISER\A.S 1149: Symbol not previously defined (__PRINT_]

The program uses an MCP23017 fed by I2C to print on a 2*16 LCD and receive button pushes from a 16 button keypad.

It uses the I2CPrintHardCommand that was developed by Barak and George. I've attached a copy.

I tried a compile on 3.7.3.3 but although it compiled it did not run. An alternative is to use another copy of Proton but having trouble finding the archive.

Any help would be appreciated.
John

PS Found a copy of Proton 3.5.5.9 and my old code works. It would be interesting to know why I had the error with the latest version

Pepe

Changed both to the format that Les described in his post  #8 on Apr 30, 2022, 08:48 PM :
  Change the: @Print  to  __Print_:

Asm-
LCD@Cur
__Cursor_:
EndAsm

Asm-
LCD@Cls
__LCD_cls_:
EndAsm

top204

#2
Quite a few years ago, I had to change the compiler's library subroutine names because the 8-bit assembler was not accepting the '@' character in names, and was sometimes splitting the names after the '@' character in them after an update to MpasmWin. It also hindered them being used in a BASIC listing replacement routine unless wrapped in Asm-EndAsm.


John Drew

Thanks Pepe and Les,
I have it compiling now. It's interesting that the original line was:
@Print                                              ; assembler Print redirect

but just a replace to:
__Print_                                              ; assembler Print redirect
did not compile, but as per Pepe's example putting a __Print_: did.
I think it makes sense to put a colon as it tells the compiler it's a label for a sub routine.

I appreciate you both setting me on the right track as it saves me going over to another machine with an old copy of Proton. Now to get on with my changes to the old program.
Cheers from Oz,
John