Project

General

Profile

Bug #782

Bsave transpiles improperly. (%end is improperly embedded)

Added by Brian Flanagan about 1 month ago. Updated 10 days ago.

Status:
Feedback
Priority:
Normal
Target version:
Start date:
06/13/2021
Due date:
% Done:

0%

Estimated time:
Affected version:

Description

For example:

// Enter your magic spell here!
Reserve As Data 15,50000
Print "Reserved 15"
Print Length(15) ' Length works by itself.
' ...but not in an expression on bSave:
Bsave "Bank15.bin",Start(15),Start(15)+Length(15)-1
Print "Done!"
End

The resulting improper traspilation of the Bsave is:

        // Bsave "Bank15.bin",Start(15),Start(15)+Length(15)-1
        aoz.sourcePos="0:5:0";
        return{type:12,waitThis:aoz.moduleFilesystem,callFunction:"bSave",waitFunction:"load_wait",args:["Bank15.bin",aoz.banks.getStart(15),aoz.banks.getStart(15)+%end]};

The %end should not be there.

#1

Updated by Brian Flanagan about 1 month ago

  • Subject changed from Length(n) transpiles improperly when inside an expression. (%end is embedded instead) to Bsave transpiles improperly. (%end is improperly embedded)

Well... not exactly, it is the BSave command itself which is not transpiling properly.
Even if I set Length(15) to the variable L, it fails the same way. (I've changed the topic accordingly.)

Example:

L=Length(15)
Bsave "Bank15.bin",Start(15),Start(15)+L-1

Result:

        // Bsave "Bank15.bin",Start(15),Start(15)+Length(15)-1
        aoz.sourcePos="0:5:0";
        return{type:12,waitThis:aoz.moduleFilesystem,callFunction:"bSave",waitFunction:"load_wait",args:["Bank15.bin",aoz.banks.getStart(15),aoz.banks.getStart(15)+%end]};

(The 3rd item in args is set improperly on Base.)

#2

Updated by Brian Flanagan about 1 month ago

  • Assignee set to Baptiste Bideaux
#3

Updated by David Baldwin 29 days ago

  • Status changed from New to Resolved

Fixed by Francois, wrong variable in instruction definition.

#4

Updated by Brian Flanagan 10 days ago

  • Status changed from Resolved to Feedback

Transpiles now, however, Bsave still fails.
(Tested in 1.0.0 (B8) u15 on 7/15/2021)

Also available in: Atom PDF