1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-28 08:50:22 +00:00
8bitworkshop/presets/vcs/vcslib/bcd.h
2023-10-30 23:16:36 -05:00

20 lines
257 B
C

#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