Author Topic: [[ebx]] is not supported?  (Read 11421 times)

Offline dalfonso01

  • Jr. Member
  • *
  • Posts: 44
[[ebx]] is not supported?
« on: June 02, 2014, 03:42:51 PM »
Hi,
I see is not working in NASM, but would have some confirmation. I see this kind of thing in an example in a book (not using NASM). This was the thing I was stucking the first time with filehandle in arguments and had to assign the content to a register to further dereference to get the effective address within the mmapped file.

The stuff should assume fasm , and I see this (out of a complete program as a way to get at once). So could confirm, as I see that this is not correct in NASM?

Thanks
Fabio D'Alfonso
« Last Edit: June 02, 2014, 03:47:49 PM by dalfonso01 »

Offline encryptor256

  • Full Member
  • **
  • Posts: 250
  • Country: lv
  • Win64 .
    • On Youtube: encryptor256
Re: [[ebx]] is not supported?
« Reply #1 on: June 02, 2014, 06:42:31 PM »
Hi!

[[ebx]] smells like some sort of pointer management, hmm, are / were you got inspired by C or C++?  ;D Cool!

No, it looks like it is not supported, but you can do it manually.
Don't blame NASM, it can do magic.
Seems that it is not even supported at machine language level.
I haven't seen such addressing mode, I would call it - pointeristic addressing mode.

But there is a solution - assemblistic version:

Code: [Select]
mov ebx,[ebx]
mov ebx,[ebx]

OR, in a single line - bytistic version:

Code: [Select]
db 0x67,0x8b,0x1b,0x67,0x8b,0x1b

Bye,
Encryptor256's Investigation \ Research Department.
Encryptor256's Investigation \ Research Department.

Offline dalfonso01

  • Jr. Member
  • *
  • Posts: 44
Re: [[ebx]] is not supported?
« Reply #2 on: June 03, 2014, 06:02:13 AM »
Hi,
thanks, as I wrote, I already made that to solve my problem last days. I just found this some around in the stuff I am using, and being found in this [multi [multi]] color world of assembly,  just was asking.

Fabio D'Alfonso