News:

;) This forum is the property of Proton software developers

Main Menu

Problem: 'Invalid operands specified'

Started by charliecoutas, Today at 10:30 AM

Previous topic - Next topic

charliecoutas

I have just tried to recompile a massive "old computer emulation" program that I wrote a few years ago. The compilation fails with "Invalid operands specified: ('repeat #0xffff')". I fished out the offending ASM, below, but I'm now stuck, it looks OK to my eyes. Any suggestions please? The chip is a 33EP512GP806, compiler vsn  1.1.3.3

It doesn't look right, clearing 64K-1???
Charlie

; clearing ram For the Clear directive
    Clr.w W0
    Mov.w #0x1000,W1
    Repeat #0xffff      <-------- this instr
    Mov.w W0,[W1++]
    Clr.w TBLPAG
    Clr.w BPF
; setup usart1
    Mov.w #0x8808,W0

charliecoutas

I've got some large ".inc" files which appear to be causing the problem. I'll fiddle around and see if I can narrow it down......

top204

His compiler needs to be updated, with either the 'free' update, or the 'payed for' upgrade.

The assembler Repeat mnemonic has a maximum amount of loops of: 0x3FFE, and the older compiler version is using 0xFFFF, which will cause the assembler to create an error message. The assembler code is produced when the Clear command is used in the code listing.

The current Positron16 compiler produces the following assembler code for the Clear command:

; clearing ram For the Clear directive
    clr.w W0
    mov.w #0x1000,W1
    repeat #0x3ffe
    mov.w W0,[W1++]

Notice the repeat's amount of loops, to clear 32768 words of RAM, before the user program starts, and before any Static variables are assigned.

It can be corrected in the compiler versions used, by removing the Clear command from the code listing.

Regards
Les


charliecoutas

Thanks Les, Paypal transaction for latest compiler done just now.

Charlie

top204

#4
Many thanks Charlie, a forum message has been sent with the download link, but if I had known it was for yourself, I would not have dreamt of receiving money from you...

My day at Bletchley Park that you arranged was something I will never forget, and my gratitude to yourself, and our lovely friend Tim for coming up here to drive me down to it, will always be part of me.

Very best regards
Les

▲