summaryrefslogtreecommitdiff
path: root/lib/simulator/engine/engine_auxiliary_alo_functions.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/simulator/engine/engine_auxiliary_alo_functions.tcl')
-rw-r--r--[-rwxr-xr-x]lib/simulator/engine/engine_auxiliary_alo_functions.tcl23
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