View Full Version : Suggested Change
bippym
20 July 2008, 17:17
Is it possible to change the PL_NOP to the number of NOPs required and not the number of bytes.
It's not difficult doubling the number of NOPS but seeing as you cannot NOP out an odd number anyway this seems a little odd!
StingRay
20 July 2008, 17:32
You can NOP out odd numbers too. ;)
1 NOP = 2 bytes = 1*2 bytes
13 NOPS = 26 bytes = 13*2 bytes. ;)
However, I also think it's much more intuitive to have the number of NOPS instead of the number of bytes in the PL_NOP macro. :)
A question of taste I would say. Anyway, I cannot change this without breaking compatibility.
But you can make your own marco if you prefer it:
PL_MYNOP macro
PL_NOP \1,\2*2
endm
StingRay
20 July 2008, 18:11
Yeah, indeed a question of taste. ;) Maybe you can add another NOP macro in the next release of WHDLOAD? :) Something like PL_NOP_NUM or something. :)
Ok, I will add another macro. Would be PL_NOPS ok?
StingRay
20 July 2008, 18:50
Perfect! :):great
bippym
21 July 2008, 03:47
Superb :D
Expect my first working WHD release soon wepl ;)
PL_NOPS has been added: http://whdload.de/whdload/whd169.lha
What happens if you run a patchlist with a PL_NOPS in it on WHDLoad < 16.9 ? Some sort of version error, right?
Would it be sensible to add a version check that also takes the minor version into consideration? Right now we can easily check for v16 using ws_Version in the slave header, but can't (for example) check for v16.9 rather than v16.8 without coding the check and error message ourselves.
I guess even if the secondary parameter of resload_Abort (with primary as TDREASON_WRONGVER) could be used to indicate the required revision, and resload_Abort displayed a suitable message when called this way, it'd be a help.
Just a suggestion. I haven't had my coffee yet, so be gentle.
get your coffee ;)
its only a macro, for WHDLoad there is no difference:PL_NOP MACRO ;fill area with nop's
PL_CMDADR PLCMD_NOP,\1
dc.w \2 ;distance given in bytes
ENDM
PL_NOPS MACRO ;fill area with nop's
PL_CMDADR PLCMD_NOP,\1
dc.w 2*\2 ;distance given in nop count
ENDM
get your coffee ;)
Good advice! :D
vBulletin® v3.7.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.