Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

PB version of the MASM example to shuffle an array.

Started by hutch--, May 17, 2016, 11:16:09 AM

Previous topic - Next topic


This is a PowerBASIC version of a MASM32 example that shuffles an array of lines of text. It has numerous uses, arranging text data for a balanced tree, general randomising of words and in a particular use, to shuffle lines of text in an include file to alter the binary image of an executable file each time it is built. The MASM32 original is in "examples\example07\shuflarr\"




Nah, you miss it, at compile time the internal order is dictated by the order of the source code so if you shuffle the order of the source code, you shuffle the internal binary image which makes it a real pain to make a static patch for. The point of the tool is so that every time you build the executable, the internal binary image is different so that a static patch for one build will not work on another build.


I just see that MASM32 example yesterday, searching for randomization. Very nice idea.  :t
Equations in Assembly: SmplMath