Jer rq 256 Message db ?,0
Here is what I'm trying to do when movsq crashes the program:
mov rdi, [Jer] ;store address of buffer in rdi add rdi,6;[numdigs] ;length of number is 6 digits mov qword rsi, 0 ;put a 0 into the source register movsq
Posted 11 August 2012 - 09:22 AM
Jer rq 256 Message db ?,0
mov rdi, [Jer] ;store address of buffer in rdi add rdi,6;[numdigs] ;length of number is 6 digits mov qword rsi, 0 ;put a 0 into the source register movsq
Posted 11 August 2012 - 09:29 AM
Posted 11 August 2012 - 10:03 AM
mov rdi, Jer ;move address of Jer to rdi
add rdi,56 ; 7 digits (including 00) * 8 (quadword) = 56
mov qword rsi, 0 ;load 0 into the source
mov qword [rdi],rsi ;manually moving instead of movsq
sub rdi,8 ;move rdi back 8 places
mov dword ecx,10
Loopp:
dec rdi
xor rdx,rdx ; clear rdx for division
div ecx ; divide by 10
movsxd rdx,edx ; store digit onto rdx
add rdx,48 ;convert to ascii
mov qword rsi,rdx ;load digit into source
mov qword [rdi],rsi ;instead of movsq
sub rdi,8 ;move rdi back more places
test eax,eax
jnz L
;Printing:
xor r9d,r9d
mov rdx, Jer ; Not sure if I'm supposed to be moving the address or the contents, but I tried both
xor rcx,rcx
call [MessageBox]
mov ecx,eax
invoke ExitProcess,0
|
|
Query failed: connection to localhost:3312 failed (errno=111, msg=Connection refused).
|
