OSDN Git Service

fixed an issue of bakapi.exe while in pan mode you cannot escape until you press...
[proj16/16.git] / 16 / reg_ex.c
1 #include <stdio.h>
2
3
4
5 void main()
6 {
7         //GENERAL PURPOSE
8         short _ax,_bx,_cx,_dx;
9         short _si,_di;
10         short _bp,_sp;
11
12         short _cs,_ds,_es,_ss;  //SEGMENT
13         short _ip;      //SPECIAL PURPOSE
14         char _cf,_pf,_af,_zf,_sf,_tf,_if,_df,_of;       //FLAGS
15
16         __asm {
17                 mov _ax,ax
18                 mov _bx,bx
19                 mov _cx,cx
20                 mov _dx,dx
21
22                 mov _si,si
23                 mov _di,di
24                 mov _bp,bp
25                 mov _sp,sp
26
27                 mov _cs,cs
28                 mov _ds,ds
29                 mov _es,es
30                 mov _ss,ss
31
32                 /*mov _ip,ip
33
34                 mov _cf,cf
35                 mov _pf,pf
36                 mov _af,af
37                 mov _zf,zf
38                 mov _sf,sf
39                 mov _tf,tf
40                 mov _if,if
41                 mov _df,df
42                 mov _of,of*/
43         }
44 //      printf("integer values: ax=%d   bx=%d   cx=%d   dx=%d\n", a, b, c, d);
45 //      printf("unsigned values:ax=%u   bx=%u   cx=%u   dx=%u\n", a, b, c, d);
46         printf("16 bit 8088 register values\n");
47         printf("general purpose:\n");
48         printf("        ax=%d\n bx=%d\n cx=%d\n dx=%d\n\n", _ax, _bx, _cx, _dx);
49         printf("        si=%d\n di=%d\n bp=%d\n sp=%d\n", _si, _di, _bp, _sp);
50         printf("segment:\n");
51         printf("        cs=%d\n ds=%d\n es=%d\n ss=%d\n", _cs, _ds, _es, _ss);
52 //      printf("        ip=%d\n\n", _ip);
53 //      printf("        cf=%d\npf=%d\naf=%d\nzf=%d\nsf=%d\ntf=%d\nif=%d\ndf=%d\nof=%d\n", _cf, _pf, _af, _zf, _sf, _tf, _if, _df, _of);
54         printf("for more info see\n     http://stackoverflow.com/questions/9130349/how-many-registers-are-there-in-8086-8088\n");
55 }