News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

A very old MS-DOS program

Started by clamicun, July 16, 2017, 12:10:58 AM

Previous topic - Next topic

clamicun

ASCII.exe
I found this MS-DOS program on a very old diskette.
Must be from 1989 or 1990. No source code.

Works correctly until 126. Then it gets a bit weird. Unicode, ascii type WCHAR ??
Had the idea to rewrite it with MASM, to be able to use the mouse (that is to scroll up and down).

Tried all possibilities to write the line with wsprintf.

text_out  db "DEZ WERT: %03u       Ascii symbol: %C        HEX WERT: %02Xh",0
INVOKE wsprintf,offset buffer,offset text_out,number,number,number.
Works from 32 to 126, gets weird too after 126.

The first 31. No chance. The ascii symbol is mostly '?'. How did I do that 27 year ago.
Olly debugger is not accepting the Dos program ?

Any ideas ?

nidud

#1
deleted

clamicun

nidud,

Assuming you running WinXP-32?
No, 2 computers Win7-32 and Win7-64


No need for that. Chars above 128 is not Unicode.

??? . Yes I know, but what to do ?
The old MS-Dos does it, but I don't how


Right-click the menu-line->Properties and change the font. TrueType fonts cant handle these clyps. If you running XP Alt-Enter (full screen) should also work.
???

The font is defined in my new prog.

INVOKE CreateFont,20,0,0,0,700,0,0,0,ANSI_CHARSET,\
OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,\
DEFAULT_QUALITY,DEFAULT_PITCH,offset Font

HSE

Hi Clamicum!!

You can see Jimg's "ascii chart" posted few weeks ago.

Regards.
Equations in Assembly: SmplMath

clamicun

HSE,
yes thanks.

You can see Jimg's "ascii chart" posted few weeks ago.
He has the same problem. Doesn't show the first 31.
Instead he shows the description ... Null char, start of Heading, start ofText ...
Most tables do that, but there are symbols in some examples. 

nidud

#5
deleted

hutch--

Solving the problem is simple, use "terminal" font. It has all of the old high ASCII characters.

aw27

#7
Quote from: clamicun on July 16, 2017, 12:10:58 AM
Works correctly until 126. Then it gets a bit weird. Unicode, ascii type WCHAR ??
Had the idea to rewrite it with MASM, to be able to use the mouse (that is to scroll up and down).

Tried all possibilities to write the line with wsprintf.

text_out  db "DEZ WERT: %03u       Ascii symbol: %C        HEX WERT: %02Xh",0
INVOKE wsprintf,offset buffer,offset text_out,number,number,number.
Works from 32 to 126, gets weird too after 126.

The first 31. No chance. The ascii symbol is mostly '?'. How did I do that 27 year ago.
Olly debugger is not accepting the Dos program ?

Any ideas ?

You can feed multibytes to a function that expects Unicode (wsprintf).

This works:

.386
.model flat, stdcall
option casemap :none 

includelib \masm32\lib\msvcrt.lib
printf proto C :vararg
includelib \masm32\lib\kernel32.lib
ExitProcess proto :dword

.data
text_out  db "DEZ WERT: %03u       Ascii symbol: %C        HEX WERT: %02Xh",13,10,0

.code

main proc

mov ebx, 0
.while ebx<256
INVOKE printf, offset text_out,ebx,bl,ebx
inc ebx
.endw

invoke ExitProcess, 0
main endp

end main






clamicun