diff options
author | Andrej Shadura <andrewsh@debian.org> | 2018-05-08 15:59:31 +0200 |
---|---|---|
committer | Andrej Shadura <andrewsh@debian.org> | 2018-05-08 15:59:31 +0200 |
commit | 47aa8b00b2b11df13a100489e0f904a4947177ef (patch) | |
tree | b35c9acc778ea2f761f3c549f7bee2f4491b3144 /lib/simulator/engine/engine_auxiliary_alo_functions.tcl | |
parent | 5b8466f7fae0e071c0f4eda13051c93313910028 (diff) |
Import Upstream version 1.4.7
Diffstat (limited to 'lib/simulator/engine/engine_auxiliary_alo_functions.tcl')
-rw-r--r--[-rwxr-xr-x] | lib/simulator/engine/engine_auxiliary_alo_functions.tcl | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/lib/simulator/engine/engine_auxiliary_alo_functions.tcl b/lib/simulator/engine/engine_auxiliary_alo_functions.tcl index d73b57e..8929268 100755..100644 --- a/lib/simulator/engine/engine_auxiliary_alo_functions.tcl +++ b/lib/simulator/engine/engine_auxiliary_alo_functions.tcl @@ -2,7 +2,7 @@ # Part of MCU 8051 IDE ( http://mcu8051ide.sf.net ) ############################################################################ -# Copyright (C) 2007-2009 by Martin Ošmera # +# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 by Martin Ošmera # # martin.osmera@gmail.com # # # # This program is free software; you can redistribute it and#or modify # @@ -21,6 +21,11 @@ # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################ +# >>> File inclusion guard +if { ! [ info exists _ENGINE_AUXILIARY_ALO_FUNCTIONS_TCL ] } { +set _ENGINE_AUXILIARY_ALO_FUNCTIONS_TCL _ +# <<< File inclusion guard + # -------------------------------------------------------------------------- # DESCRIPTION # Part of simulator engine functionality. @@ -71,7 +76,7 @@ private method alo_add {val} { incr val_h incr result -16 setBit $symbol(AC) 1 - } { + } else { setBit $symbol(AC) 0 } @@ -82,7 +87,7 @@ private method alo_add {val} { if {$result > 255} { incr result -256 setBit $symbol(C) 1 - } { + } else { setBit $symbol(C) 0 } @@ -91,7 +96,7 @@ private method alo_add {val} { setBit $symbol(OV) 1 } elseif {($val > 127) && ($sfr(224) > 127) && ($result < 128)} { setBit $symbol(OV) 1 - } { + } else { setBit $symbol(OV) 0 } @@ -139,7 +144,7 @@ private method alo_subb {val} { incr result_l 16 incr val_h setBit $symbol(AC) 1 - } { + } else { setBit $symbol(AC) 0 } @@ -150,7 +155,7 @@ private method alo_subb {val} { if {$result_h < 0} { incr result_h 16 setBit $symbol(C) 1 - } { + } else { setBit $symbol(C) 0 } @@ -162,10 +167,14 @@ private method alo_subb {val} { setBit $symbol(OV) 1 } elseif {($val < 128) && ($sfr(224) > 127) && ($result < 128)} { setBit $symbol(OV) 1 - } { + } else { setBit $symbol(OV) 0 } # Set Acc set sfr(224) $result } + +# >>> File inclusion guard +} +# <<< File inclusion guard |