Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions e3.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,11 @@ unsigned char text [max];

long stack[100];

#define RETURN goto *(*esp--)
#define RETURN goto *(void*)*esp--
#define CALL(calladr,retadr) *++esp=(long)&&_loc##retadr; goto calladr; _loc##retadr:
#define PUSH(arg) *++esp=arg
//#define POP(arg) (long*)arg=*esp--
#define POP(arg) arg=(long *)(*esp--);
#define POPEBP(arg) arg=(unsigned char*)*esp--
#define POP(arg) arg=(long)*esp--;

int main(int argc,char**argv,char **envp)
{
Expand Down Expand Up @@ -369,7 +369,7 @@ Menu: CALL(MakeScanCode,12);
if (eax>=27) goto EndeRet; // if no valid scancode
CompJump2:ebx=(long)jarray[(int)ebx];
//------
CALL(*ebx,13); // the general code jump dispatcher
CALL(*(void*)ebx,13); // the general code jump dispatcher
//------
if (numeriere)
{
Expand Down Expand Up @@ -855,7 +855,7 @@ SB_ret: extra=1;
lines = (eax-1)&0xFF; // without status line
#if 1
// this is not portable: maybe 32bit Linux plus some Un*x systems ?
columns = eax >> 16; // columns > 255 are ignored...
columns = (eax >> 16)& 0xFF; // columns > 255 are ignored...
#else
columns = 80;
#endif
Expand Down Expand Up @@ -912,7 +912,7 @@ sl4: ++edi;
CALL(sys_writeKP,93); // restore old cursor pos
NoWrite:POP(edi);
POP(esi);
POP(ebp);
POPEBP(ebp);
POP(ebx);
POP(edx);
POP(ecx);
Expand Down Expand Up @@ -1555,7 +1555,7 @@ RSL4: edi = (long)&(screenline[-2]);
RSno_lineNr:CALL(StatusLineShow,156); // now write all at once
POP(edi);
POP(esi);
POP(ebp);
POPEBP(ebp);
POP(ebx);
POP(edx);
POP(ecx);
Expand Down Expand Up @@ -1585,7 +1585,7 @@ WriteMess9:PUSH(eax);
CALL(StatusLineShow,158);
POP(edi);
POP(esi);
POP(ebp);
POPEBP(ebp);
POP(ebx);
POP(edx);
POP(ecx);
Expand Down Expand Up @@ -1782,7 +1782,7 @@ CloseFile:eax=close(ebx);
RETURN;
Fstat: eax=fstat(ebx,&fstatbuf);
RETURN;
RenameFile:eax=rename((unsigned char*)ebx,(unsigned char*)ecx);
RenameFile:eax=rename((const char*)ebx,(const char*)ecx);
RETURN;
ChownFile:eax=fchown(ebx,ecx,edx);
RETURN;
Expand Down