masm32

Assembly x86 Date to Number - Breaking a string into smaller sections

孤者浪人 提交于 2019-11-27 02:13:39
I'm actually looking to be pointed in the right direction on an issue. I'm looking to convert a date in x86 Assembly from the format "DD-MMM-YYYY" to a unique number so that it can be bubble sorted later and eventually converted back. So, when I have a string input ie: .data inDate dw "08-SEP-1993" And I want to split it up to day = "08" month = "SEP" year = "1993" So that I can process it further (I'll be converting SEP to "7", ect.) So my question is what is a simple, efficient way to break the date down (code-wise)? I know I'll need to convert the date format to allow for sorting, but I'm

Confusing brackets in MASM32

泪湿孤枕 提交于 2019-11-26 17:51:43
I am trying to get to grips with MASM32 and am confused by the following: I thought that brackets were used for indirection so if I have the a pre-defined variable .data item dd 42 then mov ebx, item would put the contents of 'item', i.e. the number 42, into ebx and mov ebx, [item] would put the address of 'item', i.e. where the 42 is stored, into ebx. But the following code in a console app: mov ebx, item invoke dwtoa, ebx, ADDR valuestr invoke StdOut, ADDR valuestr mov ebx, [item] invoke dwtoa, ebx, ADDR valuestr invoke StdOut, ADDR valuestr prints 42 twice. To get the address of 'item' I

Bubble sort in x86 (masm32), the sort I wrote doesn't work

本小妞迷上赌 提交于 2019-11-26 14:52:17
问题 I'm trying to write a bubble sort in x86 (masm32). The sort doesn't work. I've tested some of the code and it appears to be messed up in the compare and swap sections. For some reason, the compare function always assigns 2 to EAX. If I can figure out why I can get the program working. Thanks for your help in advance. .data aa DWORD 10 DUP(5, 7, 6, 1, 4, 3, 9, 2, 10, 8) count DWORD 0 ; DB 8-bits, DW 16-bit, DWORD 32, WORD 16 BYTE 8 .code ; Tell MASM where the code starts ; ««««««««««««««««««««

Assembly x86 Date to Number - Breaking a string into smaller sections

放肆的年华 提交于 2019-11-26 11:39:00
问题 I\'m actually looking to be pointed in the right direction on an issue. I\'m looking to convert a date in x86 Assembly from the format \"DD-MMM-YYYY\" to a unique number so that it can be bubble sorted later and eventually converted back. So, when I have a string input ie: .data inDate dw \"08-SEP-1993\" And I want to split it up to day = \"08\" month = \"SEP\" year = \"1993\" So that I can process it further (I\'ll be converting SEP to \"7\", ect.) So my question is what is a simple,

Confusing brackets in MASM32

微笑、不失礼 提交于 2019-11-26 03:59:28
问题 I am trying to get to grips with MASM32 and am confused by the following: I thought that brackets were used for indirection so if I have the a pre-defined variable .data item dd 42 then mov ebx, item would put the contents of \'item\', i.e. the number 42, into ebx and mov ebx, [item] would put the address of \'item\', i.e. where the 42 is stored, into ebx. But the following code in a console app: mov ebx, item invoke dwtoa, ebx, ADDR valuestr invoke StdOut, ADDR valuestr mov ebx, [item]