unit Emulator_MiscFuncs; interface // Циклический Inc procedure CyclicInc(var AByte:Byte; MaxValue:Byte); overload; procedure CyclicInc(var AWord:Word; MaxValue:Word); overload; implementation procedure CyclicInc(var AByte:Byte; MaxValue:Byte); begin if AByte=MaxValue then AByte:=0 else Inc(AByte); end; procedure CyclicInc(var AWord:Word; MaxValue:Word); begin if AWord=MaxValue then AWord:=0 else Inc(AWord); end; end.