What causes the different instruction offset between gdb/linux and debug/dos?

  • Thread starter Thread starter dduardo
  • Start date Start date
  • Tags Tags
    Instruction
AI Thread Summary
In the discussion, a notable difference in instruction offsets between DOS and Linux is observed, with DOS consistently showing an offset of 3 and Linux an offset of 5. This discrepancy raises questions about the underlying compilation and linking processes used in each environment. The programs are compiled and linked using different tools: DOS utilizes MASM and ML with DEBUG, while Linux employs NASM and LD with GDB. The variations in instruction offsets may stem from differences in how these assemblers and linkers handle instruction encoding and memory alignment.
dduardo
Staff Emeritus
Science Advisor
Insights Author
Messages
1,902
Reaction score
3
I notice with gdb/linux each instruction is offset by 5 while debug/dos each instruction is offset by 3. What is linux doing that dos isn't?
 
Computer science news on Phys.org
Is it consistently 3 or 5? Do you know how the programs were compiled? Are they on the same machine?
 
Yes, under dos it is always 3 and under linux it is always 5. I'm running the same two programs on different computers and assembling and linking them with different programs

dos/masm/ml/debug
linux/nasm/ld/gdb
 
I came across a video regarding the use of AI/ML to work through complex datasets to determine complicated protein structures. It is a promising and beneficial use of AI/ML. AlphaFold - The Most Useful Thing AI Has Ever Done https://www.ebi.ac.uk/training/online/courses/alphafold/an-introductory-guide-to-its-strengths-and-limitations/what-is-alphafold/ https://en.wikipedia.org/wiki/AlphaFold https://deepmind.google/about/ Edit/update: The AlphaFold article in Nature John Jumper...
Thread 'Urgent: Physically repair - or bypass - power button on Asus laptop'
Asus Vivobook S14 flip. The power button is wrecked. Unable to turn it on AT ALL. We can get into how and why it got wrecked later, but suffice to say a kitchen knife was involved: These buttons do want to NOT come off, not like other lappies, where they can snap in and out. And they sure don't go back on. So, in the absence of a longer-term solution that might involve a replacement, is there any way I can activate the power button, like with a paperclip or wire or something? It looks...
Back
Top