• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

X64-Register Table

Started by Theo Gottwald, March 16, 2012, 08:18:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Theo Gottwald





If i see it right, we may have more  REGISTER Variables in a future PB x64!

x86-64 Mnemonics


x86-64 Gen. Infos (CSC 373 Sections 501,510 Winter 2016 Assembly Language)[/url]

Aslan Babakhanov

Yes, that's right! And this will give us benefits in many areas and avoid data allocation in segments. i.e. direct register usage.
Imagine, that you have registers from RAX to RGX and general purpose registers from R8 to R15!

Just speculating the syntax ;)

' FULL full range of register i.e. 64 bit,
'
DIM X AS REG_R8, _
       Y AS REG_R9, _
       Z AS REG_R10

X = Y + Z

? STR$(X)

' will be complied as
'
' xor r8, r8
' xor r9, r9
' xor r10, r10
' add r9, r10
' mov r8, r10
' push r8
' call STR64$
' push rax
' call MsgBox64

You can look at real 64 bit applications written in fasm for information at http://menuetos.net/64bit.htm

Theo Gottwald

We'll see how many Registers Bob needs internally and for the runtime.

But I am sure he'll leave us some more then the two REGISTERS of PB x32.
I like Register-Variables and Inline ASM.
And I generally avoid languages that do not have them.

Aslan Babakhanov

BTW, I'd like the idea of PREFIX statement in PB10, but in my opinion, for inline assembler would be better to use ASM/END ASM blocks --

this looks irregular.

FASTPROC xx: PREFIX "! "
  push ebp
  mov esp, ebp
  ...
END PREFIX: END FASTPROC


But this syntax is looking elegant and similar to other languages with inline asm

FASTPROC xx
  ASM
   push ebp
   mov esp, ebp
  END ASM
END FASTPROC


What do you think?

Theo Gottwald

Aslan, i think ... you can do it yourself using a MACRO :-).
For me, i do not use ASM sooo often that this would make a significant difference.
Actually i use the "!" in every line.

The Prefix did not make it to my toolbox as it has some exceptions i'd had to study first.