Auto-Assemble DB Directive Limit & No Script Search Func

Find a Bug? Have a Problem? Like to Suggest a Feature? Do it Here

Moderators: g3nuin3, SpeedWing, WhiteHat, mezzo

Auto-Assemble DB Directive Limit & No Script Search Func

Postby ystsoi » Sat Apr 04, 2009 5:51 pm

I found that Auto-Assemble will produce incorrect code for the following ASM:
Code: Select all
Alloc(Data,2048)
Data:
DB "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbb"


In fact, if there are more than 255 bytes following a DB directive, incorrect code will be produced. The solution is to cut the string and use several DB directives instead.

I think it would be better to report the limit instead of generating incorrect code when Next is clicked.


And it seems that I cannot make any functions to appear in the dropdown lists of the Script Search dialog. I used the example from the Help Topics. Hotkeys work fine.

Thanks,
Shing
ystsoi
I Have A Few Questions
 
Posts: 2
Joined: Sat Apr 04, 2009 5:28 pm

Postby L. Spiro » Sun Apr 05, 2009 8:30 am

There should not be a 255-character limit at all.
By design, all strings in MHS are fully dynamic in size; static buffers are never used (one reason for its stability).

So this must be some kind of temporary buffer used to speed up debugging but that I may have forgotten to finalize.

I will remove the limit.


In order for strings to appear in the drop-down list in the Script Search dialog you must have first entered them once into the combo box. It is a record of functions you have used, not a list of all functions in your scripts.


L. Spiro


[EDIT]
Found the problem.
Although it parses the full DB command and does correctly use a dynamic buffer to avoid overflow, it stores the length of the command in the intermediate buffer using a BYTE. I have simply changed it to DWORD and it can now store any size of command.
[/EDIT]
Our songs remind you of songs you’ve never heard.
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Postby ystsoi » Sun Apr 05, 2009 11:04 am

I can manage to do a Script Search, thanks.
ystsoi
I Have A Few Questions
 
Posts: 2
Joined: Sat Apr 04, 2009 5:28 pm


Return to Bugs/Problems/Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests