Compare commits

...

1 Commits

Author SHA1 Message Date
Yourtion
8de80dcee7 关闭窗口 2016-05-10 15:21:03 +08:00
3 changed files with 13 additions and 0 deletions

View File

@@ -15,6 +15,7 @@
GLOBAL _api_point
GLOBAL _api_refreshwin
GLOBAL _api_linewin
GLOBAL _api_closewin
[SECTION .text]
@@ -170,3 +171,11 @@ _api_linewin: ; void api_linewin(int win, int x0, int y0, int x1, int y1, int c
POP ESI
POP EDI
RET
_api_closewin: ; void api_closewin(int win);
PUSH EBX
MOV EDX,14
MOV EBX,[ESP+8] ; win
INT 0x40
POP EBX
RET

View File

@@ -373,6 +373,8 @@ int *hrb_api(int edi, int esi, int ebp, int esp, int ebx, int edx, int ecx, int
if ((ebx & 1) == 0) {
sheet_refresh(sht, eax, ecx, esi + 1, edi + 1);
}
} else if (edx == 14) {
sheet_free((struct SHEET *) ebx);
}
return 0;
}

View File

@@ -3,6 +3,7 @@ void api_initmalloc(void);
char *api_malloc(int size);
void api_refreshwin(int win, int x0, int y0, int x1, int y1);
void api_linewin(int win, int x0, int y0, int x1, int y1, int col);
void api_closewin(int win);
void api_end(void);
void HariMain(void)
@@ -17,5 +18,6 @@ void HariMain(void)
api_linewin(win + 1, 88, 26, i * 9 + 88, 89, i);
}
api_refreshwin(win, 6, 26, 154, 90);
api_closewin(win);
api_end();
}