News:

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

Main Menu

New Installation of Positron Compliers Problems

Started by pjdenyer, May 30, 2021, 01:49 PM

Previous topic - Next topic

pjdenyer

Hi,

I am using 24EP512GU810 connected to an SSD1963 800 x 480 Lcd display.

I have just installed the new Positron Compliers. When I compile my current project I have a problem with "Print" command.

A snipit of my code:

    Cls clBlue
    Print At 250, 100, Ink clBrightYellow ,"FLASH Test Program"        ' Print Signon Screen
    Print AT 250, 131, "(C)APD Systems  V1.0"
    DelayMS 4000                                                ' Display for 4 Seconds

    FL_Flash_Init()                                                                                       
    Print "Manufacturer ID : $", Hex2 FL_bManufacturer_ID, CR
    Print "Memory Type     : $", Hex FL_bMemory_Type, CR
    Print "Capacity        : $", Hex FL_wCapacity, CR
    Print "Device          : ", Str FL_Device, CR
    Print "Bytes per Page  : $", Hex4 FL_bMax_PageBytes, CR
    Print "Pages           : $", Hex4 FL_wMax_Pages, CR
    Print "4K Sectors      : $", Hex4 FL_wMax_4K_Sectors, CR
    Print "32K Sectors     : $", Hex4 FL_wMax_32K_Blocks, CR
    Print "64K Blocks      : $", Hex4 FL_bMax_64K_Blocks
    DelayMS 5000                                                ' Display for 5 Seconds

Displays the following:

Manufacturer ID : $Memory Type     : $Capacity        : $Device          : Bytes per Page  : 0 - Pages          : 0 - 4K Sectors      : 0 - 32K Sectors     : 0 - 64K Blocks      : 0 -

When complied with the previous USB version, displays the following:

                           FLASH Test Program
                          (C)APD Systems  V1.0

    Manufacturer ID : $BF
    Memory Type     : $25
    Capacity        : $41
    Device          : SST25VF016B - 2Mb Device
    Bytes per Page  : $00FF
    Pages           : $1FFF
    4K Sectors      : $0FFF
    32K Sectors     : $01FF
    64K Blocks      : $00FF


As I see it, the compiler is failing to process the extensions to the Print command, i.e. At, INK, Variables, CR.
It only seems to be finding the basic Print "XXXX" statement and ignoring anything else.

I have tried reinstalling several times, even with install as administrator, but no difference.

I have just deleted Positron Compliers - I was unable to uninstall via windows, and i have reinstall the proton24 1.0.8.0, i.e. the USB version and everything works fine.

Any ideas.

RGV250

Hi,
I am not sure Proton/Positron supports that display directly so you will probably have an Include file in the program.
If it does have an Include file do you know who wrote it originally and are they on the new forum.
Either way if it does use an Include file or not you would need to post a complete program with or without the include file rather than a snippet.

Regards,
Bob

pjdenyer

Hi,

I have 2 Rar files. The Proton version was compiled with proton24 1.0.8.0 and the Positron version was compiled with positron16 basic compiler. version 1.1.0.1.

I have included all the files necessary the build the project, including my SSD1963.inc library which I have written myself.

The Proton version works, the Positron version does not.

How do I attach Rar files to upload them?

pjdenyer

Found the attachment Button, so here's the files

pjdenyer

#4
After further investigation, I have been comparing the two ASM files.

In the Proton version the first difference is at the first Print Line
; rd_i000130_f001_000878_p000016,0 mkr$ in [ssd1963_spi_eeprom.bas] Print At 250, 0, ink clBrightYellow, "Flash test program"
    mov.w #250,W6
    mov.w #0,W0
    call _glcd__cursor_
    mov.w #65504,W0
    mov.w W0,_GLCD_Ink_
    mov.w #tbloffset(str__lb1),W0
    call __print__code_string

In the Positron version the first difference is at the first Print Line
; rd_i000130_f001_000878_p000016,0 mkr$ in [ssd1963_spi_eeprom.bas] Print At 250, 0, ink clBrightYellow, "Flash test program"
    mov.w #250,W6
    mov.w #0,W0
    call _glcd__cursor_


In the Proton Version, the cursor position is Set, the ink colour is set and then the text is printed.
In the Positron Version, the cursor position is Set, but no code has been produced to set the Ink colour and print the text.

Looking further down the ASM's it is clear that the complier Print Command only see's the first "item" after the Print statement

It look's to me that my Positron version is incorrectly built?




top204

#5
Many thanks for the code.

Upon a quick look at the assembler produced, you are correct, it appears that the compiler is not parsing the At directive correctly in the 16-bit compiler and is missing pieces after it in the Print command. It is unknown why it has happened because I never touched the Print command within the compiler's source.

I'm on it now and will have something for you ASAP.

top204

The correction is downlaodable from here:

Positron Compilers corrections update 4.0.0.2 and 1.1.0.2

Many thanks for pointing out the anomaly. It was a tricky one to find and correct, but I found it and got it! :-)

pjdenyer