1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-12-02 19:49:29 +00:00
8bitworkshop/presets/vcs/vcslib/bcd.h

20 lines
257 B
C
Raw Normal View History

2023-10-28 04:11:03 +00: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