Author Topic: fs/gs  (Read 1894 times)

JK

  • Member
  • **
  • Posts: 194
fs/gs
« on: July 24, 2020, 06:42:47 AM »
While in 64 bit this works:

Code: [Select]
  mov qword ptr rax, gs:[...] 
  mov gs:[...], rax 

this 32 bit code doesn´t:

Code: [Select]
  mov dword ptr eax, fs:[...]
  mov fs:[...], eax

What am i doing wrong? I want to read/write data from/to the TEB.


JK

nidud

  • Member
  • *****
  • Posts: 2388
    • https://github.com/nidud/asmc
Re: fs/gs
« Reply #1 on: July 24, 2020, 07:06:44 AM »
deleted
« Last Edit: February 26, 2022, 04:06:14 AM by nidud »

JK

  • Member
  • **
  • Posts: 194
Re: fs/gs
« Reply #2 on: July 24, 2020, 08:04:48 PM »
Ok - thanks, indeed this solves the problem!

Quote
fs is assumed to error ...

just to understand the background - why?