Author Topic: replace dd with dq for 64 bits ?  (Read 184 times)

0 Members and 1 Guest are viewing this topic.

chrisc

  • Guest
replace dd with dq for 64 bits ?
« on: March 21, 2018, 12:11:54 PM »
in the Assembly  language when converting from 32bits to 64bits,  do we replace DD  doubleword   with  DQ  quadword  ?
since the pointer addresses are in sys

as in the code below there are DD

Code: [Select]
$ filename "Gt.exe"
use rtl64
use corewin


'  For pointers
SYS  Sgp1
SYS Sgp2
SYS Sgp3
SYS Sgp4
SYS Sgp5
SYS Sgp6
SYS Sgp7
SYS Sgp8



 '=========================================================================================
SUB InitGT()

  GOTO  Pointerdefs

  ASpt1:
  DD &H6, &H5, &H1, &H7, &HE, &H0, &H4, &HA, &HB, &H9, &H3, &HD, &H8, &HC, &H2, &HF
  NOP
  NOP
  ASpt2:
  DD &HE, &HD, &H9, &H0, &H8, &HA, &HC, &H4, &H7, &HF, &H6, &HB, &H3, &H1, &H5, &H2
  NOP
  NOP
  ASpt3:
  DD &H6, &H5, &H1, &H7, &H2, &H4, &HA, &H0, &HB, &HD, &HE, &H3, &H8, &HC, &HF, &H9
  NOP
  NOP
  ASpt4:
  DD &H8, &H7, &H3, &H9, &H6, &H4, &HE, &H5, &H2, &HD, &H0, &HC, &H1, &HB, &HA, &HF
  NOP
  NOP
  ASpt5:
  DD &HA, &H9, &H6, &HB, &H5, &H1, &H8, &H4, &H0, &HD, &H7, &H2, &HE, &H3, &HF, &HC
  NOP
  NOP
  ASpt6:
  DD &H5, &H3, &H0, &H6, &HB, &HD, &H4, &HE, &HA, &H7, &H1, &HC, &H2, &H8, &HF, &H9
  NOP
  NOP
  ASpt7:
  DD &H2, &H1, &HC, &H3, &HB, &HD, &HF, &H7, &HA, &H6, &H9, &HE, &H0, &H8, &H4, &H5
  NOP
  NOP
  ASpt8:
  DD &H6, &H5, &H1, &H7, &H8, &H9, &H4, &H2, &HF, &H3, &HD, &HC, &HA, &HE, &HB, &H0
  NOP
  NOP

' pointer defintitions
Pointerdefs:

  Sgp1 = @ASpt1
  Sgp2 = @ASpt2
  Sgp3 = @ASpt3
  Sgp4 = @ASpt4
  Sgp5 = @ASpt5
  Sgp6 = @ASpt6
  Sgp7 = @ASpt7
  Sgp8 = @ASpt8

END SUB

chrisc

  • Guest
Re: replace dd with dq for 64 bits ?
« Reply #1 on: March 21, 2018, 04:15:21 PM »
the question is whether we need to replace DD with DQ  for 64bits ASM ?

Charles Pegge

  • Admin Support Member
  • *****
  • Posts: 3721
    • Oxygen Basic
Re: replace dd with dq for 64 bits ?
« Reply #2 on: March 21, 2018, 05:19:28 PM »
Probably not. 64bit data is rarely used, and its pretty unreadable though o2 machine script will support it in a different format:

Code: [Select]
sys p=@mydata
print hex *(p+4)
end
mydata:
'dd 0x0405060708 0x00010203
o2 hq0102030405060708

chrisc

  • Guest
Re: replace dd with dq for 64 bits ?
« Reply #3 on: March 21, 2018, 05:41:45 PM »
Thanxx a lot, Charles