Recent Posts

Pages: [1] 2 3 ... 10
1
The Campus / Re: JSON Parser
« Last post by Raistlin on Today at 08:19:27 AM »
@2ton: Doubtfull. Copy and paste original source & we might
talk.(PM if you want) .

What  has GPL have to do with anything around the
conversation. Doesn't make for better code, or is that
an invite ?

My opinion is mine, asked for and answered. If you disagree,
so be it.. Find someone else to help.....
2
The Campus / Re: JSON Parser
« Last post by 2ton on Today at 07:58:02 AM »
Seriously = No, that 64-bit lib looks suspect.
Author of said lib chiming in, curious as to why you think it is suspect. (As mentioned elsewhere, it is general purpose and <= SSE2 quite intentionally, and GPL).

Cheers
3
The Campus / Re: Using a data label to map to mutliple strings
« Last post by CaptainPanda on Today at 07:44:10 AM »
Can I ask what "byte ptr []" actually does? Is it some form of indirection?

It compares the content of the memory pointed to by edi to zero. Your code just checked whether the pointer itself was zero... and that is not really what you wanted 8)

Ah right so I was essentially checking the memory address and not the value, that makes sense now, silly me.

Thanks for the help everyone, just learned of OllyDb from this so I feel I'll be better equipped come next problem.
4
Romper Room / Re: A small joke
« Last post by Mikl__ on Today at 07:41:47 AM »
excuse me for my bad english, but I wanted to write
"Any joke has a small fraction of joke"
5
The Campus / Re: Using a data label to map to mutliple strings
« Last post by jj2007 on Today at 07:36:01 AM »
Can I ask what "byte ptr []" actually does? Is it some form of indirection?

It compares the content of the memory pointed to by edi to zero. Your code just checked whether the pointer itself was zero... and that is not really what you wanted 8)
6
The Campus / Re: JSON Parser
« Last post by Raistlin on Today at 07:10:38 AM »
Really well done young padewan. Seriously = No, that 64-bit lib looks suspect. I have had the privilege of seeing god-like SSE
and 64-bit code in my lifetime. Where? Right here on the forum.

The thing is, no one here will write code for you, ever. The end. They will however painstakingly help you with your code....
ASM is the BEST, but you probably know that already. The
fastest & smallest & sexy-ist code & most difficult to unlearn in the world (probably universe) = assembly. Absolute perfection
is always around the corner. Believe me, I am still hunting

BTW: We reinvent the wheel here on a daily basis. The wheels produced here, are from time to time the
subject of  international peer reviewed research papers,.
7
The Campus / Re: Using a data label to map to mutliple strings
« Last post by CaptainPanda on Today at 07:06:37 AM »
eax is zero at this point:
    WriteStringRegNL eax

Check carefully what this code is doing:
Code: [Select]
GetRoomDescription proc rptr:DWORD
mov edi, rptr

SkipName:
cmp edi, 0
je SkippedName
inc edi
jmp SkipName

SkippedName:
mov eax, edi
.if !eax
mov eax, Chr$("ERROR")   ; to avoid the crash
.endif
ret

GetRoomDescription endp

Did you mean cmp byte ptr [edi], 0?

That seemed to fix it. Can I ask what "byte ptr []" actually does? Is it some form of indirection?
8
GoAsm / Re: conversion
« Last post by shankle on Today at 06:53:43 AM »
                 6-20-2018

    how to convert this "c" code to GoASM
   
   DWORD dwSizeofDIB = dwBmpSize + sizeof(BITMAPFILEHEADER) +\
        sizeof(BITMAPINFOHEADER)

;  this is my code - gives an error
BITMAPINFOHEADER STRUCT
   biSize        DD
   biWidth       DD
   biHeight      DD
   biPlanes      DW
   biBitCount    DW
   biCompression DD
   biSizeImage   DD
   biXPelsPerMeter DD
   biYPelsPerMeter DD
   biClrUsed       DD
   biClrImportant  DD
ENDS

BITMAPFILEHEADER STRUCT
   bfType DW
   bfSize DD
   bfReserved1 DW
   bfReserved2 DW
   bfOffBits DD
ENDS

dwBmpSize      dd  0
dwSizeofDIB    dd  0

    mov D[dwSizeofDIB],[D[dwBmpSize] + sizeof BITMAPFILEHEADER +\
       sizeof BITMAPINFOHEADER]

    Thanks for any help.
    
9
The Campus / Re: JSON Parser
« Last post by iguananed on Today at 06:45:24 AM »
I have very little(none)  ASM experience. Just did not want to re invent the wheel. I figured it was something that might have already been done.
10
The Campus / Re: Using a data label to map to mutliple strings
« Last post by zedd151 on Today at 06:24:58 AM »
No, it's not the stack, it's the inc edi until edi==0.

OOps you're right just looked at it again in olly.  :P

I was watching the stack variable get changed, and didn't look at the program flow.  :icon_redface:

At any rate there is probably more than a dozen ways of doing this little piece of code. Seems a little long and drawn out.
But since he's learning, a good exercise none the less.
Pages: [1] 2 3 ... 10