News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_CPCLER

WinAPE bug??

Started by CPCLER, 15:13, 22 March 09

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

CPCLER

I seem to have a problem when doing conditional assembly and making use of the fabulous relocate table function at the same time in winape assembler.

this code makes the assembler freeze:

org    &4000

let     a = 1

jp    dosomething

if     a = 0

relocate_start
dw relocate_count
relocate_end
endif

.dosomething

ld    hl,data
ld    de,&2000
ld    bc,9*2
ldir
ret

.data dw 1,2,3,4,5,6,8,9


I am converting a small Amsdos utility to SymbOS and want the source for both versions in the same file.
SymbOS makes use of the relocate facility, but it seems there are some problems when doing conditional assembly at the same time....

Never succeeded in bringing down the assembler before!

Is this a bug or am I doing something wrong?

/CPCLER

Executioner

Quote from: CPCLER on 15:13, 22 March 09
Is this a bug or am I doing something wrong?

Hi CPCLER, it's a bug. WinAPE appears to attempt to evaluate the relocation count even though it's inside the false condition, but the previous relocate_start wasn't processed, so it tries to generate an error and gets into an infinite loop trying to skip to the end of the line. I've fixed this for the next release.

CPCLER

Hi Executioner

Excellent, looking forward to the next release of WinAPE. My fav development to for CPC!  :)

There is however a way to bypass the bug.


relocate_start

org    &4000

let     a = 0

jp    dosomething

if     a = 1

.rel dw relocate_count

else
     dw 1002
.rel dw &FFFF

endif

.dosomething

ld    hl,data
ld    de,&2000
ld    bc,9*2
ldir
ret

.data dw 1,2,3,4,5,6,8,9

relocate_end


Regards,
CPCLER
Quote from: Executioner on 00:47, 24 March 09

Hi CPCLER, it's a bug. WinAPE appears to attempt to evaluate the relocation count even though it's inside the false condition, but the previous relocate_start wasn't processed, so it tries to generate an error and gets into an infinite loop trying to skip to the end of the line. I've fixed this for the next release.

Powered by SMFPacks Menu Editor Mod