Author Topic: convert to hex  (Read 8911 times)

Offline MajorDill

  • Jr. Member
  • *
  • Posts: 5
convert to hex
« on: April 18, 2010, 05:53:29 AM »
After 4 days I already LOVE nasm and I already have a major problem.

I have been recompiling an old 8086 program which is about 12,000 lines of code (data section NOT included) and
 everything is in hex.

mov  ax,FFFF
int    21
cmp  word [1010],----

Anything with a letter errors out (which is good) but anything like 21 just reads it as decimal 21.
Short of going thru 12,000 lines of code handwise, and trying to fix everything, or write a basic program to try to figure every
type of coding (so I don't screw up labels or registers)  and appending an "h", is there anyway for the compiler or the program to just assume everything is in HEX?

Thanks for any help in advance

Offline Keith Kanios

  • Full Member
  • **
  • Posts: 383
  • Country: us
    • Personal Homepage
Re: convert to hex
« Reply #1 on: April 18, 2010, 07:09:25 AM »
Not that I am aware of. Sounds like a fairly massive undertaking.

Properly crafted RegEx(s) should do the majority of the work. Let me know if you are interested in taking this route.