Hey guys, its great to be part of an asm forum for once ;> I'm interested in asm coding, the only reason i dont do it much it because i do mostly windows coding....

for those of you still reading after my previous statement, thanks >;]

I'd like some help with a small project i'm working on. Well, my main problem is language specific. I'm a delphi/vb/c++ coder, and I dont often use asm and its kind of a pain to deal with certain things that I didn't have to worry about with a high level lang. But thats the price you pay for low level POWER ;>

My problem is this.

I'm inputting strings from the console, first of which is a key and the rest a message to encrypt. I know its easy, ive done it years ago in other langs but now suddenly its a daunting task! Things i need to know how to do are:

get a string thats stored in the dx register into a var declared as "key db 255 dup('$')"

please dont say i need to put the length of the read string into cx, and loop thru them ALL and mov byte by byte into my var. I have to do operations like this a LOT in my project.

Other issues are determining whether a given character in a byte is within the range of A-Z! I know the ascii bounds but there's no easy way to do double conditions....

I appreciate any help guys.

- x86 0101
Posted on 2003-05-27 17:21:42 by x86 0101
String pointed by dx? Are you talking about int 21h? Then, forget it. Check out the following APIs in your SDK documentation (or, MSDN web site)


They must be what you want.

If you get the input by line, you can use ReadFile() instead of above APIs, which puts the string to the buffer you specified.
Posted on 2003-05-27 19:55:06 by Starless
are you serious? hmmm.. what the hell kinda asm am I learning then? lol

we are using nothing but DOS interrupts to do everything. I take it to do win coding with asm you need to drop those are use something a LOT more efficient. You are right, i'm using INT 21H with various constants in the AH part of the (e)AX register. Does this mean my tasks are much harder? ...prolly....

any suggestions are appreciated. thanks again

- x86 0101
Posted on 2003-05-27 23:04:54 by x86 0101
If you believe that int 21h is the gateway to Win32 API, you got it all wrong. What you are trying to do is to write a DOS app, not a Win32 app. Probably you want to find a DOS forum (if one still exists) for your question.
Posted on 2003-05-28 00:33:01 by Starless
I think that you're confusing language with API (and OS). You think that assembly language only lets you develope programs for 16bit DOS/BIOS using 8086 instructions.

You can create windows applications using assembly language. Since Windows is a 32bit environment, you must use 80x86 instructions. If you create a Win32 app, you won't have access to DOS and BIOS interrupts.

There are basically two classes of Win32 apps, console programs and GUI programs. But console programs can have a message loop and GUI programs can have a console window (looks like a DOS box).

The following link demostrates how do "Hello World" using DOS, Win32, and Linux: http://www.asmcommunity.net/board/index.php?topic=11394.msg86193

Since have experience writing windows programs, using the API in assembly language should be straight forward. But you will have to learn how to use assembly language to write Win32 apps.

Here is a set of useful tutorials. You can also search the board for invaluable information.
Iczelion's tutorials
Posted on 2003-05-28 04:47:54 by eet_1024
I don't know of a way of doing fget() / $INKEY /BIOS int 16h without using a message loop, at least on STDIN.
Posted on 2003-05-28 04:50:22 by eet_1024
Thanks for the input. I didn't confuse dos and windows coding, I am trying to make a DOS program. Its just that there aren't any resources available for it anymore and doing anything with it now is just daunting.

If anyone knows where such resources are i'd appreciate it, if not then I can understand as it IS pretty scarce ;>

After I'm done with these DOS apps for my papers (school work requires it this way) i'll move onto some Win32 coding in asm!

- RaGe
Posted on 2003-05-28 13:52:13 by x86 0101