projects
/
emu8051.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1c1972
)
Simplify carry bit set/clr functions
author
Hugo Villeneuve
<hugo@hugovil.com>
Sun, 17 Nov 2013 21:19:52 +0000
(16:19 -0500)
committer
Hugo Villeneuve
<hugo@hugovil.com>
Sun, 17 Nov 2013 22:26:54 +0000
(17:26 -0500)
src/psw.c
patch
|
blob
|
history
diff --git
a/src/psw.c
b/src/psw.c
index
bf75854
..
d2b9117
100644
(file)
--- a/
src/psw.c
+++ b/
src/psw.c
@@
-38,21
+38,13
@@
psw_write_cy(int cy)
void
psw_set_cy(void)
{
- u_int8_t psw = memory_read8(INT_MEM_ID, _PSW_);
-
- psw |= PSW_FLAG_CY;
-
- memory_write8(INT_MEM_ID, _PSW_, psw); /* Save updated value */
+ psw_write_cy(1);
}
void
psw_clr_cy(void)
{
- u_int8_t psw = memory_read8(INT_MEM_ID, _PSW_);
-
- psw &= ~PSW_FLAG_CY;
-
- memory_write8(INT_MEM_ID, _PSW_, psw); /* Save updated value */
+ psw_write_cy(0);
}
/* Returns 0 or 1 */