1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2025-02-13 13:30:55 +00:00

20 lines
257 B
C
Raw Normal View History

2023-10-27 23:11:03 -05:00
#ifndef _BCD_H
#define _BCD_H
#define BCD_ADD(a,b) { \
int _temp = (b); \
asm("sed"); \
(a) += _temp; \
asm("cld"); \
}
#define BCD_SUB(a,b) { \
int _temp = (b); \
asm("sed"); \
(a) -= _temp; \
asm("cld"); \
}
#endif