flat assembler
Message board for the users of flat assembler.
Index
> Tutorials and Examples > [Example] Displays current CPU state |
Author |
|
HaHaAnonymous 12 Feb 2013, 23:17
This example reads, and displays current CPU state (registers, flags, FPU, etc...)
It can be called from any point in the program, this example calls it at start. New registers are not taken into account, my CPU does not even have them. This example is guaranteed to run in most systems. Sample output (x86_64): Code: rax = $F3F6F581447EDD1C xmm0 = $00000000000000000000000000000000 rbx = $E1D7DA5E86187417 xmm1 = $0000000000000000F3F6F581447EDD1C rcx = $9090909090909090 xmm2 = $00000000000000000000000000000000 rdx = $68A4744D99460C9F xmm3 = $00000000000000000000000000000000 rdi = $BD9CE3363325C13B xmm4 = $00000000000000000000000000000000 rsi = $57629A0F93635C5B xmm5 = $00000000000000000000000000000000 r8 = $0988541216C2CCF9 xmm6 = $00000000000000000000000000000000 r9 = $4CEDBD02FC3A09AA xmm7 = $00000000000000000000000000000000 r10 = $A2D9ED1DA3B17832 xmm8 = $00000000000000000000000000000000 r11 = $575D8A6170F9BAC8 xmm9 = $00000000000000000000000000000000 r12 = $A6F0B417661D364F xmm10 = $00000000000000000000000000000000 r13 = $44CFE6B25759C512 xmm11 = $00000000000000000000000000000000 r14 = $F57130111DEF7BD0 xmm12 = $00000000000000000000000000000000 r15 = $0000000000000000 xmm13 = $00000000000000000000000000000000 rbp = $0000000000000000 xmm14 = $00000000000000000000000000000000 rsp = $00007FFF0904BDC8 xmm15 = $00000000000000000000000000000000 rip = $000000000040013E st0 = $00000000000000000000 mm0 = $0000000000000000 st1 = $00000000000000000000 mm1 = $0000000000000000 st2 = $00000000000000000000 mm2 = $0000000000000000 st3 = $00000000000000000000 mm3 = $0000000000000000 st4 = $00000000000000000000 mm4 = $0000000000000000 st5 = $00000000000000000000 mm5 = $0000000000000000 st6 = $00000000000000000000 mm6 = $0000000000000000 st7 = $00000000000000000000 mm7 = $0000000000000000 Partial stack at [rsp]: _-_-_-_-_-_-_-_-_-_-0000000000000000: $9090909090909090-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-0000000000000008: $0000000000000001-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-0000000000000010: $00007FFF0904D45B-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-0000000000000018: $0000000000000000-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-0000000000000020: $00007FFF0904D461-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-0000000000000028: $00007FFF0904D476-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-0000000000000030: $00007FFF0904D481-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-0000000000000038: $00007FFF0904D498-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-0000000000000040: $00007FFF0904D4AB-_-_-_-_-_-_-_-_-_-_ _-_-_-_-_-_-_-_-_-_-0000000000000048: $00007FFF0904D4BD-_-_-_-_-_-_-_-_-_-_ Ordinary segments: CS: $0000000000000033 SS: $000000000000002B DS: $0000000000000000 ES: $0000000000000000 FS: $0000000000000000 GS: $0000000000000000 Ordinary flags: CF = 0 PF = 0 AF = 0 ZF = 0 SF = 0 TF = 0 IF = 1 DF = 1 OF = 0 NT = 0 IOPL = 0
Last edited by HaHaAnonymous on 11 Jul 2016, 19:12; edited 11 times in total |
|||||||||||
12 Feb 2013, 23:17 |
|
KevinN 14 Feb 2013, 15:55
Thanks for your time! These little programs can be written off as useless but they're not.. I mean, Unix-like oses seem to be made up of em.
|
|||
14 Feb 2013, 15:55 |
|
HaHaAnonymous 14 Feb 2013, 16:41
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 21:30; edited 2 times in total |
|||
14 Feb 2013, 16:41 |
|
randall 07 Mar 2013, 14:57
Nice program. Thanks.
|
|||
07 Mar 2013, 14:57 |
|
Bob++ 09 Mar 2013, 16:22
Looks like very nice. I will download it.
|
|||
09 Mar 2013, 16:22 |
|
uart777 13 Mar 2013, 11:25
HaHa: Good ideas. We definitely need debugging functions like this, they are NOT useless.
|
|||
13 Mar 2013, 11:25 |
|
HaHaAnonymous 24 Mar 2013, 16:12
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 21:16; edited 2 times in total |
|||
24 Mar 2013, 16:12 |
|
comrade 24 Mar 2013, 22:26
HaHaAnonymous wrote: No, they are useless indeed. Everything I do is useless. Whoever wrote this (and I am assuming it is not HaHaAnonymous), I will find and I am gonna put a bullet in yo' bitch ass. Meet me some-fucking-where. Give me an address. But you better come strapped. Cause I am gonna be strapped. The clip is in the motherfuckin' gun. http://www.youtube.com/results?search_query=irate+black+man |
|||
24 Mar 2013, 22:26 |
|
HaHaAnonymous 07 Feb 2014, 19:04
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 18:18; edited 1 time in total |
|||
07 Feb 2014, 19:04 |
|
sid123 07 Feb 2014, 23:51
Wow, Will surely help me take less coffee as I usually go realllly mad with
my programs and code. Maybe this could help. |
|||
07 Feb 2014, 23:51 |
|
HaHaAnonymous 08 Feb 2014, 01:13
[ Post removed by author. ]
Last edited by HaHaAnonymous on 28 Feb 2015, 18:18; edited 1 time in total |
|||
08 Feb 2014, 01:13 |
|
typedef 27 Aug 2014, 14:08
questlima wrote: another great thing about FASM is i get to learn how to write apps for Linux Is your grandma Grace Hopper? |
|||
27 Aug 2014, 14:08 |
|
questlima 27 Aug 2014, 14:13
nop but Ada Lovelace was my grandma's best friend:LOL
Last edited by questlima on 27 Aug 2014, 14:18; edited 1 time in total |
|||
27 Aug 2014, 14:13 |
|
questlima 27 Aug 2014, 14:15
typedef wrote:
you are funny mate:) nop but Grace Hopper was my grandma's best friend:LOL |
|||
27 Aug 2014, 14:15 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.