Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Pascal - <b> swap exchange hi/lo bytes of integer pp 144</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SWAP                  Exchange Hi/Lo bytes of Integer                pp 144

 Syntax:  Swap (IntVar) ;

 Type:    Integer

 Form:    Function

 Purpose: Exchange high and low bytes of integer variable.


 ----------------------------------------------------------------------------


 Usage:
       VAR
          IntVar : Integer ;  { Declare integer variable           }

       BEGIN
          IntVar := $1234  ;  { Set to hex value $1234 for clarity }
          Swap IntVar      ;  { IntVar = $3412 after swap          }
       END.

See Also: Hi Lo

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson