X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_t.h;h=35eb2f4b8036923fb719dfc552d51490afcdc2b1;hb=968b6bcf1d7f19f8902e1ae00f2a80ab78d399cc;hp=ada39a1145faa6f11af51421646ab8257bb0be2b;hpb=fb733fa9f63c8922ed3fcaeb48f11938becf94c8;p=16.git diff --git a/src/lib/16_t.h b/src/lib/16_t.h index ada39a11..35eb2f4b 100755 --- a/src/lib/16_t.h +++ b/src/lib/16_t.h @@ -41,6 +41,11 @@ typedef unsigned long int diword; typedef signed long int sdiword; typedef enum {false,true} boolean; +typedef enum {ichi,ni,san,yon,go,roku,shichi,hachi,kyu,ju,juichi,juni,jusan,juyon,jugo,juroku} nibble; +//typedef unsigned nibb:4 nibble; + +#define HI_NIBBLE(b) (((b) >> 4) & 0x0F) +#define LO_NIBBLE(b) ((b) & 0x0F) /*typedef unsigned memseg; memptr should be replaced by memseg in code. @@ -62,6 +67,20 @@ typedef void _seg * memptr;//typedef void __based( void ) * memptr; ////old //-- #ifdef __WATCOMC__ #define _argv __argv #define _argc __argc + +//from http://www.verycomputer.com/3_65d875cc818b54ec_1.htm +void clrscr(void); +#pragma aux clrscr= \ + " mov ah, 0fh " \ + " int 10h " \ + " xor ah, ah " \ + " int 10h " ; +//from http://stackoverflow.com/questions/18425748/gotoxy-function-using-printf-s-position +inline void gotoxy(int x,int y) +{ + printf("\x1B[%d;%df", y, x); + fflush(stdout); // @jxh +} #endif #endif/*_TYPE_H_*/