RUN( EMUL_JCALL_BIOS() );

26 views
Skip to first unread message

mui...@naver.com

unread,
Dec 11, 2011, 7:58:50 AM12/11/11
to Little Man Computer
A = INT2DBOX(00000100 + j);
RUN( EMUL_JCALL_BIOS() );

와 같은 코드를 작성하여 컴파일하면

starter.c:211:1: error: unterminated argument list invoking macro
"BRANCH"
../../memory/roms/emul.h:35: error: ‘BRANCH’ undeclared (first use in
this function)
../../memory/roms/emul.h:35: error: (Each undeclared identifier is
reported only once
../../memory/roms/emul.h:35: error: for each function it appears in.)
starter.c:127: error: expected ‘;’ at end of input
starter.c:127: error: expected declaration or statement at end of
input
starter.c:127: error: expected declaration or statement at end of
input

라고 에러가 발생하며

starter.c는 제가 작성한 매직코드이고
211줄은 파일의 마지막 줄로 비어있습니다.

뭐가 문제일까요...

Daeyoung Heo

unread,
Dec 11, 2011, 9:19:41 AM12/11/11
to Little Man Computer, mui...@naver.com
EMUL_CALL과 EMUL_JCALL_BIOS 매크로의 코드가 잘못되어 있습니다.

다음과 같이 코드를 수정하세요.

emul.h 파일
---------------------------------------------------
원본 43 라인:
(__emul_status__ = emul_call(__VA_ARGS__);\
수정 43 라인:
(__emul_status__ = emul_call(__VA_ARGS__));\
===================================================
수정후
#define EMUL_CALL(...)\
(__emul_status__ = emul_call(__VA_ARGS__));\
if(__emul_status__ == STATUS_JUMP) return FALSE;\
else if(__emul_status__ == STATUS_SHUTDOWN) return TRUE\
===================================================
원본 48 라인:
(__emul_status__ = emul_jcall_bios(__VA_ARGS__);\
수정 48 라인:
(__emul_status__ = emul_jcall_bios(__VA_ARGS__));\
===================================================
수정후
#define EMUL_JCALL_BIOS(...)\
(__emul_status__ = emul_jcall_bios(__VA_ARGS__));\
if(__emul_status__ == STATUS_JUMP) return FALSE;\
else if(__emul_status__ == STATUS_SHUTDOWN) return TRUE\
===================================================
---------------------------------------------------

emul.c 파일
---------------------------------------------------
원본 183 라인:
retVal = LittleMan();
추가 184 라인:
MEMORY_EMUL.size = 0;
===================================================
수정후
{
retVal = LittleMan();
MEMORY_EMUL.size = 0;
if (DBOX2INT(PC) == returnPC)
break;
===================================================
원본 217 라인:
retVal = LittleMan();
추가 218 라인:
MEMORY_EMUL.size = 0;
===================================================
수정후
PC = INT2DBOX(MAGICCODE_BIOS);
retVal = LittleMan();
MEMORY_EMUL.size = 0;
RETURN = INT2DBOX(0);
===================================================
---------------------------------------------------

허대영.

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages