Topic : The GFA-Basic Compendium Author : GFA Systemtechnik GmbH Version : GFABasic.HYP v2.98 (12/31/2023) Subject : Documentation/Programming Nodes : 899 Index Size : 28056 HCP-Version : 3 Compiled on : Atari @charset : atarist @lang : @default : Document not found @help : Help @options : +g -i -s +z @width : 75 @hostname : STRNGSRV @hostname : CAB @hostname : HIGHWIRE @hostname : THING View Ref-FileINC, DEC ADD, SUB, MUL, DIV PRED(), SUCC() ADD(), SUB(), MUL(), DIV() MOD() These instructions are shorter forms of the following frequently used statements: Instruction Corresponds to DEC x x=x-1 INC x x=x+1 ADD x,y x=x+y SUB x,y x=x-y MUL x,y x=x*y DIV x,y x=x/y The statements on the left require less time for their execution than those on the right, particularly in the case of integer variables. It is important to note that INC, DEC, ADD, SUB, MUL, and DIV do not carry out an overflow check with integer variables (types |, &, and %). If overflow occurs, only the appropriate number of low-order bits (8 for byte, 16 for word, etc.) are used for the result. Thus for byte-sized variables, if x|=16 and y|=17, MUL x|,y| gives the result 16 in x|. The extra '256' in the 9th bit is ignored. Memo: For compiler options see section 'Integer Rounding'. For compiler optimizations see sections 'Simple Additions', 'Multiplication', 'Division', and 'More Complicated Calculations'. For information about how the compiler handles integer overflow see section 'Integer Overflow'.