]> 4ch.mooo.com Git - 16.git/commitdiff
added regestry example to 16 for dumping of stuff wwww
authorsparky4 <sparky4@cock.li>
Tue, 5 Jun 2018 17:50:41 +0000 (12:50 -0500)
committersparky4 <sparky4@cock.li>
Tue, 5 Jun 2018 17:50:41 +0000 (12:50 -0500)
16/reg_ex.c [new file with mode: 0755]
16/vgmtools
src/lib/doslib

diff --git a/16/reg_ex.c b/16/reg_ex.c
new file mode 100755 (executable)
index 0000000..a742554
--- /dev/null
@@ -0,0 +1,55 @@
+#include <stdio.h>
+
+
+
+void main()
+{
+       //GENERAL PURPOSE
+       short _ax,_bx,_cx,_dx;
+       short _si,_di;
+       short _bp,_sp;
+
+       short _cs,_ds,_es,_ss;  //SEGMENT
+       short _ip;      //SPECIAL PURPOSE
+       char _cf,_pf,_af,_zf,_sf,_tf,_if,_df,_of;       //FLAGS
+
+       __asm {
+               mov _ax,ax
+               mov _bx,bx
+               mov _cx,cx
+               mov _dx,dx
+
+               mov _si,si
+               mov _di,di
+               mov _bp,bp
+               mov _sp,sp
+
+               mov _cs,cs
+               mov _ds,ds
+               mov _es,es
+               mov _ss,ss
+
+               /*mov _ip,ip
+
+               mov _cf,cf
+               mov _pf,pf
+               mov _af,af
+               mov _zf,zf
+               mov _sf,sf
+               mov _tf,tf
+               mov _if,if
+               mov _df,df
+               mov _of,of*/
+       }
+//     printf("integer values: ax=%d   bx=%d   cx=%d   dx=%d\n", a, b, c, d);
+//     printf("unsigned values:ax=%u   bx=%u   cx=%u   dx=%u\n", a, b, c, d);
+       printf("16 bit 8088 register values\n");
+       printf("general purpose:\n");
+       printf("        ax=%d\n bx=%d\n cx=%d\n dx=%d\n\n", _ax, _bx, _cx, _dx);
+       printf("        si=%d\n di=%d\n bp=%d\n sp=%d\n", _si, _di, _bp, _sp);
+       printf("segment:\n");
+       printf("        cs=%d\n ds=%d\n es=%d\n ss=%d\n", _cs, _ds, _es, _ss);
+//     printf("        ip=%d\n\n", _ip);
+//     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);
+       printf("for more info see\n     http://stackoverflow.com/questions/9130349/how-many-registers-are-there-in-8086-8088\n");
+}
index 057e0126a66a4d287508d79f9a407a0a30293c5f..a59529ede4026a6d7fb0005621537d53c78f211a 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 057e0126a66a4d287508d79f9a407a0a30293c5f
+Subproject commit a59529ede4026a6d7fb0005621537d53c78f211a
index 95e54cfb9b31f35a793e36735ff25c8d81b0653f..ae5d98814539f01c57bb012f7e5c7652011988da 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 95e54cfb9b31f35a793e36735ff25c8d81b0653f
+Subproject commit ae5d98814539f01c57bb012f7e5c7652011988da