flat assembler
Message board for the users of flat assembler.
Index
> Main > DB/DW/DD/etc |
Author |
|
babyboy10777 28 Jun 2006, 08:34
Also, here is a procedure I wrote that refers to bytes defined inside code, and it works perfectly, so I don't understand why the previous code doesn't.
; n2th(*t, n) - Convert 32BIT number to unsigned hexadecimal text db '0123456789ABCDEF' n2th: mov eax, [esp + 8] mov ecx, [esp + 4] xor edx, edx @@: mov dl, al and dl, 15 mov dl, [(n2th-16) + edx] mov [ecx], dl inc ecx shr eax, 4 jnz @b mov byte [ecx], 0 push ecx call trev ret 8 |
|||
28 Jun 2006, 08:34 |
|
dead_body 28 Jun 2006, 08:35
.code section maybe has not atrribute "writeable"?
see macro '.code' and macro '.data' and compare it.(and if you need correct ".code" macro(add writeable attribute)) |
|||
28 Jun 2006, 08:35 |
|
vid 28 Jun 2006, 08:40
it's best to use macros only when you understand them. for example, instead of .code you can write section '.text' code readable executable. To make it writable, change this to section '.text' code readable writeable executable
|
|||
28 Jun 2006, 08:40 |
|
babyboy10777 28 Jun 2006, 10:45
Oh, I forgot the "writeable" attribute It was: section '.code' code readable executable.
Thanks everyone. |
|||
28 Jun 2006, 10:45 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.