hello.

i would like to create win32 programs for the console using assembly. i know DOS programming using tp 5.5, quickbasic, and a little C/C++. i am new to assembly. i chose to make win32 programs to pose as a challenge for me.

how do i start?
Posted on 2002-02-07 11:13:40 by bundat
Start with Iczelion's tutorials. Win32 Console is nothing but windows programming, so once you get familir with win32 programming, then move on to the console which is only : AllocConsole() to get started .... then other crappy APIs to manipulate the data.
Posted on 2002-02-07 11:41:35 by lackluster
bundat,

MASM32 is set up to write 32 bit console mode programs and it has examples and library function to do this. Its a good starting point to design your own code to do what you like in this area.

Regards,

hutch@movsd.com
Posted on 2002-02-07 20:54:09 by hutch--
bundat,

kamusta kabayan!

as follow-up to hutch's reply, you can check the examples in the MAsm32 package, specifically <m32path>\example3\textio . (that is, if you haven't already :)

.pix

// 3 pinoy sa win32asm board. hmmm, 'di na masam? :grin:
Posted on 2002-02-07 22:32:52 by pixelwise
thanks for all the replies. so, masm32 will create win32 console programs right off the bat? without using exotic windows API's? and these are not 'DOS' programs that need to call 'ntvdm.exe'?

for my first big project i plan to make 'edit.com' into a non-DOS program. i use win2k pro and edit still calls ntvdm.

will i be better off if i start with DOS asm? i have severeal ASM books here.

pixelwise, i added you to my buddy list.
Posted on 2002-02-08 01:04:23 by bundat
No, you're not better off with dos asm... it's more confusing and
limiting with its segmentation, limited addressing modes, etc.

"standard" console apps (C/pascal printf/writeln style) use ReadFile
and WriteFile for console I/O, allowing redirection and all the nifty
things. You don't need to AllocConsole if you specify /SUBSYSTEM:CONSOLE
to the linker, as a default console will be created (or an existing
reused). And no, console apps don't use dos stuff... there seems
to be some helper task involved in 9x though, but I haven't bothered
to check if it's 16 or 32ibt.

As for edit-style "full-screen" access, there are other APIs. WriteConsole
and WriteConsoleOuptut for instance. There's no way to
get "direct" access like under dos, but the performance loss is not
really measurable. In fact, some video cards might be faster with
windowed win32 consoles than fullscreen text modes.

Oh yes, remember that console chars are in UNICODE and textattr
is a WORD too, so each char takes up 4 bytes of memory... I would
suggset you to keep an internal "B800-style" text buffer and translate
it to windows console format when updating the screen - works
pretty well.
Posted on 2002-02-08 13:16:50 by f0dder