Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

Old programmers never die, they just hit account block limit.


programming / comp.lang.asm.x86 / Re: Easily convert 16bit asm to 32bit with DEBUGX.COM?

SubjectAuthor
* Re: Easily convert 16bit asm to 32bit with DEBUGX.COM?11mangu01
+- Re: Easily convert 16bit asm to 32bit with DEBUGX.COM?JJ
`- Re: Easily convert 16bit asm to 32bit with DEBUGX.COM?Frank Kotler

1
Subject: Re: Easily convert 16bit asm to 32bit with DEBUGX.COM?
From: 11mang...@nospicedham.gmail.com
Newsgroups: comp.lang.asm.x86
Organization: A noiseless patient Spider
Date: Mon, 3 Aug 2020 09:18 UTC
References: 1
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: 11mang...@nospicedham.gmail.com
Newsgroups: comp.lang.asm.x86
Subject: Re: Easily convert 16bit asm to 32bit with DEBUGX.COM?
Date: Mon, 3 Aug 2020 02:18:46 -0700 (PDT)
Organization: A noiseless patient Spider
Lines: 124
Approved: fbkotler@myfairpoint.net - comp.lang.asm.x86 moderation team.
Message-ID: <95fa292f-4bf0-40f1-8d15-2b9ac690be2eo@googlegroups.com>
References: <a27cf122-b25b-4e2a-a7fa-dff3ee176a36@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Date: Mon, 03 Aug 2020 09:18:46 +0000
Injection-Info: reader02.eternal-september.org; posting-host="166ac4cb8eae80df8a96feabaa6572d8";
logging-data="24339"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/1t6F/4XgSZ9uByAwGOFlctysm8B0nL1g="
User-Agent: G2/1.0
Cancel-Lock: sha1:Uo3HV8UmNu1DwPufUYjKpRlBdFQ=
View all headers
On Monday, 30 June 2014 04:12:52 UTC+1, William Gallant  wrote:
I have never found any 16bit to 32bit asm converters
( always told there is none ). My theory is to take a
16bit program and pass it through a modified DOS DEBUG
program such as Paul Vojta's DEBUGX.COM and spew
out 32bit. Does this seem possible?

I think it is semi possible, i think a program could be made to run an assembaled assembaly file coded in 16 bit asm, and then from that generate a 32 or 64 bit asm file that gives an ok output.

e.g:

8086:
======

..data
 text db "Hello World!",10,13,0
....

..code
 mov dx, text
 mov ah, 09h
 int 21h
....

translated from output to nasm 32:
section .text
 mov rax, 1
 mov rdi, 1
 mov rsi, 72
 mov rdx, 1
 syscall

 mov rax, 1
 mov rdi, 1
 mov rsi, 101
 mov rdx, 1
 syscall

 mov rax, 1
 mov rdi, 1
 mov rsi, 108
 mov rdx, 1
 syscall

 mov rax, 1
 mov rdi, 1
 mov rsi, 108
 mov rdx, 1
 syscall

 mov rax, 1
 mov rdi, 1
 mov rsi, 111
 mov rdx, 1
 syscall

 mov rax, 1
 mov rdi, 1
 mov rsi, 32
 mov rdx, 1
 syscall

 mov rax, 1
 mov rdi, 1
 mov rsi, 119
 mov rdx, 1
 syscall

 mov rax, 1
 mov rdi, 1
 mov rsi, 111
 mov rdx, 1
 syscall

 mov rax, 1
 mov rdi, 1
 mov rsi, 114
 mov rdx, 1
 syscall

 mov rax, 1
 mov rdi, 1
 mov rsi, 108
 mov rdx, 1
 syscall

 mov rax, 1
 mov rdi, 1
 mov rsi, 100
 mov rdx, 1
 syscall

 mov rax, 1
 mov rdi, 1
 mov rsi, 33
 mov rdx, 1
 syscall

 mov rax, 1
 mov rdi, 1
 mov rsi, 10
 mov rdx, 1
 syscall

 mov rax, 1
 mov rdi, 1
 mov rsi, 13
 mov rdx, 1
 syscall

 mov rax, 1
 mov rdi, 1
 mov rsi, 0
 mov rdx, 1
 syscall

 mov rax, 60
 mov rdi, 0
 syscall

; or something along those lines

but displaying text is easy and so more advanced things would not be able to translate very well but this is just a concept.



Subject: Re: Easily convert 16bit asm to 32bit with DEBUGX.COM?
From: JJ
Newsgroups: comp.lang.asm.x86
Organization: Aioe.org NNTP Server
Date: Tue, 4 Aug 2020 08:10 UTC
References: 1 2
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: jj4pub...@nospicedham.vfemail.net (JJ)
Newsgroups: comp.lang.asm.x86
Subject: Re: Easily convert 16bit asm to 32bit with DEBUGX.COM?
Date: Tue, 4 Aug 2020 15:10:18 +0700
Organization: Aioe.org NNTP Server
Lines: 37
Approved: fbkotler@myfairpoint.net - comp.lang.asm.x86 moderation team.
Message-ID: <1271oslnjq1ag$.1ho8on7x1b20c$.dlg@40tude.net>
References: <a27cf122-b25b-4e2a-a7fa-dff3ee176a36@googlegroups.com> <95fa292f-4bf0-40f1-8d15-2b9ac690be2eo@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Injection-Info: reader02.eternal-september.org; posting-host="1591f5f0427f77989ed1bb297d312092";
logging-data="22197"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19uJuUnXMcdQHiTA+8I9jbvFJW6Ovm3jto="
User-Agent: 40tude_Dialog/2.0.15.84
Cancel-Lock: sha1:RXG9c5uFRxqg01IEOJZ71xNF6RA=
View all headers
On Mon, 3 Aug 2020 02:18:46 -0700 (PDT), 11mangu01@nospicedham.gmail.com
wrote:
On Monday, 30 June 2014 04:12:52 UTC+1, William Gallant  wrote:
I have never found any 16bit to 32bit asm converters
( always told there is none ). My theory is to take a
16bit program and pass it through a modified DOS DEBUG
program such as Paul Vojta's DEBUGX.COM and spew
out 32bit. Does this seem possible?

I think it is semi possible, i think a program could be made to run an
assembaled assembaly file coded in 16 bit asm, and then from that
generate a 32 or 64 bit asm file that gives an ok output.

e.g:

[snip]

but displaying text is easy and so more advanced things would not be able
to translate very well but this is just a concept.

I actually need DEDBUG's binary data manipulation so much that I had to make
my own DEBUG clone to remake that sole functionality, using VBScript.

https://pastebin.com/XfctsB1e

The dis/assembler part was considered but I've changed my mind, considering
that 32/64 bit (non DOS) programs use a not-so-simple image structure. Not
to mention the overwhelming x86 & x64 instruction sets and operating
environments.

It would be great if there's a full 32/64 bit version of DEBUG, rather than
a 32/64 bit DEBUG but with 16-bit functionalities.

Or, is there a 32/64 bit console based debugger (for Windows) with assembler
and binary file & memory manipulation already? Just like what DEBUG can do?
So far, I only found the GUI ones.



Subject: Re: Easily convert 16bit asm to 32bit with DEBUGX.COM?
From: Frank Kotler
Newsgroups: comp.lang.asm.x86
Organization: Aioe.org NNTP Server
Date: Tue, 4 Aug 2020 19:49 UTC
References: 1 2
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: fbkot...@nospicedham.myfairpoint.net (Frank Kotler)
Newsgroups: comp.lang.asm.x86
Subject: Re: Easily convert 16bit asm to 32bit with DEBUGX.COM?
Date: Tue, 4 Aug 2020 15:49:55 -0400
Organization: Aioe.org NNTP Server
Lines: 134
Approved: fbkotler@myfairpoint.net - comp.lang.asm.x86 moderation team.
Message-ID: <rgce6e$28n$1@gioia.aioe.org>
References: <a27cf122-b25b-4e2a-a7fa-dff3ee176a36@googlegroups.com>
<95fa292f-4bf0-40f1-8d15-2b9ac690be2eo@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: reader02.eternal-september.org; posting-host="1591f5f0427f77989ed1bb297d312092";
logging-data="14388"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/y12GoEm0G92DLzTm4C1fEMbUCWoW32jM="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Thunderbird/52.5.2
Cancel-Lock: sha1:jzKAzPqu/k7T9qb83irWZ7znlW8=
View all headers
On 08/03/2020 05:18 AM, 11mangu01@nospicedham.gmail.com wrote:
On Monday, 30 June 2014 04:12:52 UTC+1, William Gallant  wrote:
I have never found any 16bit to 32bit asm converters
( always told there is none ). My theory is to take a
16bit program and pass it through a modified DOS DEBUG
program such as Paul Vojta's DEBUGX.COM and spew
out 32bit. Does this seem possible?

I think it is semi possible, i think a program could be made to run an assembaled assembaly file coded in 16 bit asm, and then from that generate a 32 or 64 bit asm file that gives an ok output.

e.g:

8086:
======

.data
  text db "Hello World!",10,13,0
...

.code
  mov dx, text
  mov ah, 09h
  int 21h
...

translated from output to nasm 32:
section .text
  mov rax, 1
  mov rdi, 1
  mov rsi, 72
  mov rdx, 1
  syscall

  mov rax, 1
  mov rdi, 1
  mov rsi, 101
  mov rdx, 1
  syscall

  mov rax, 1
  mov rdi, 1
  mov rsi, 108
  mov rdx, 1
  syscall

  mov rax, 1
  mov rdi, 1
  mov rsi, 108
  mov rdx, 1
  syscall

  mov rax, 1
  mov rdi, 1
  mov rsi, 111
  mov rdx, 1
  syscall

  mov rax, 1
  mov rdi, 1
  mov rsi, 32
  mov rdx, 1
  syscall

  mov rax, 1
  mov rdi, 1
  mov rsi, 119
  mov rdx, 1
  syscall

  mov rax, 1
  mov rdi, 1
  mov rsi, 111
  mov rdx, 1
  syscall

  mov rax, 1
  mov rdi, 1
  mov rsi, 114
  mov rdx, 1
  syscall

  mov rax, 1
  mov rdi, 1
  mov rsi, 108
  mov rdx, 1
  syscall

  mov rax, 1
  mov rdi, 1
  mov rsi, 100
  mov rdx, 1
  syscall

  mov rax, 1
  mov rdi, 1
  mov rsi, 33
  mov rdx, 1
  syscall

  mov rax, 1
  mov rdi, 1
  mov rsi, 10
  mov rdx, 1
  syscall

  mov rax, 1
  mov rdi, 1
  mov rsi, 13
  mov rdx, 1
  syscall

  mov rax, 1
  mov rdi, 1
  mov rsi, 0
  mov rdx, 1
  syscall

  mov rax, 60
  mov rdi, 0
  syscall

; or something along those lines

Have you tun this code? I doubt it. Looka like it'll segfault to me.

but displaying text is easy and so more advanced things would not be able to translate very well but this is just a concept.


Might be "possuble" but I doubt it'll ever be "useful". Yoo mich difference between OSen!

Best,
Frank



1
rocksolid light 0.7.2
clearneti2ptor