Statistics

Members: 1927
News: 293
Web Links: 1
Visitors: 3931451

Who's Online

Damn Vulnerable LinuxDamn Vulnerable Linux (DVL) is a Linux-based (modified Damn Small Linux) tool for IT-Security & IT-Anti- Security and Attack & Defense. [CLICK HERE FOR MORE INFOS! ]

Featured Conference Video

T16-Recon2006-Joe_Stewart-OllyBonE.gif OllyBone - Semi-Automatic Unpacking on IA-32. View the conference video here!
Home arrow Assembly Programming Journalarrow Issue 2 (1998-2001)
Issue 2 (1998-2001)

::/ ::::::.
:/___:::::::.
/| ::::::::.
:| _/:::::::::.
:| _| ::::::::::.

:::_____:::::::::::..............................................INTRODUCTION
by mammon_

Wow! This issue is huge. More than twice the size of the last; maybe it is time to go monthly...

This issue has as its theme --such as it were-- the use of popular free- and shareware assemblers. It began with my needing to write a GAS intro to accompany my X-Windows article; shortly thereafter, Linuxjr emailed me the benefits of his university training with his A86 tutorial (beginners: this is for you! Linuxjr explains everything). I then appealed to Gij to allow me to incorporate his Nasm 'Quick-Start' guiide, which I have used often...he posted the condition that I edit it heavily ;)

I would like to draw your attention first to our new column: Assembly Language Snippets. Originally this was an idea which I and a few others had; however, I never received any contributions for the 'Snippets' section. Then I received an email from Troy with the first one... I pulled the rest out of my various asm sources and voila, a new column was born. This is something that is fully open to contributions; asm snippets --and we will need lots-- may be emailed to asmjournal@mailcity.com or mammon_@hotmail.com, or they may be posted to the Message Board at http://pluto.beseen.com/boardroom/q/19784/ Basic format should be:

;Name:                Name to title you with
;Routine Title:       Name to title the snippet with
;Summary:             One-Line Description
;Comaptibility        Specific Assemblers or OSes this works with
;Notes:               Any extra notes you have

--Code--

I should point out here that freeservers.com is not very reliable; thus the APJ home page is inaccessible more often than not. For this reason I have set up a mirror on my own page, at http://www.eccentrica.org/Mammon/APJ/index.html

As for this issue's articles, we once again have two fine Win32 asm tutorials by Iczelion, who maintains an excellent page at http://iczelion.cjb.net (with a Win32 asm message board!). Ghirribizzo has supplied his fun Key Generator Competition results (I can't say I was surprised when I saw the winner ;).

Larry Hammick --who also maintains an excellent, smoking-enabled page at http://www3.bc.sympatico.ca/hammick/-- has contributed a fantastic piece on asm optimization. XBios2 has this time gone above and beyond, not only with the C Language in Assembly but with his Issue Challenge as well... asm coders and reverse engineers alike should read this.

As for the issue challenge, XBios2 did not provide me with one for next issue, so I used one from a text I found on the Internet somewhere... he has been emailed the text and can try to beat it ;) Also, I am going to be setting up a page for reader responses to the Issue Challenges -- readers can anticipate the solutions before each issue comes out, or try and best the solution afterwards. Submissions can be sent to the same places as the Snippets.

Author Bio's? I know mainstream mags do this-- if you want one, send one. I'll tack it onto the end of the article ... anything within reason: URL, email, hobbies, perversions, favorite drink, favorite linux distro, etc.

Next Issue: How many articles on Code Optimization can I get? That would make a great theme (with the foundation laid this issue)--anything from code theory to PentiumII-specific optimizations would be welcome. Prospective articles, send to me or post on the MB...no topic is unacceptable unless you can in no way possible relate it to assembly language.

Enjoy the ish,
_m


X-Windows in Assembly Language: Part I
X-Windows in Assembly Language: Part I

The sensible way to write programs for X-Windows is to use a toolkit such as Xt or Gtk; the easy way would be to use a scripting package such as Python or Tcl/Tk. Modern assembly language coders, however, are known for sacrificing ease and sensibility in the name of curiosity and execution speed; it is in this spirit that the potential for programming X-Windows in assembly language will now be investigated.


Read More >>

The _Xprintf functions
The _Xprintf functions

This is the second article I write on the C standard library, and perhaps some ask: "Why should this interest us?" or, more gently, "What's the philosophy behind these articles?". Well, here is why I write these articles:

  • For C programmers that want to know what happens behind the HLL 'curtain'
  • For asm programmers who wish to get ideas
  • For asm programmers who need a C command but want to keep their code 'slim' (actually the code sec...
    Read More >>

A Simple Window
A Simple Window
In this tutorial, we will build a Windows program that displays a fully functional window on the desktop.

Read More >>

Tips on Saving Bytes in ASM Programs
Tips on Saving Bytes in ASM Programs

The programmer's word for craftsmanship is "optimization". This term refers to conservation, either of program size or execution time. It's time includes not just CPU clocks, but the time consumed by peripherals (e.g. disks, at load time) and by the operating system calls. This article is concerned with the conservation of size, or bytes. Size may refer either to the program file size, or to the size of the memory the program uses. The two are not always identical.

...
Read More >>


Painting with Text
Painting with Text
In this tutorial, we will learn how to "paint" text in the client area of a window. We'll also learn about device context.
Read More >>

A Guide to NASM for TASM Coders
A Guide to NASM for TASM Coders

The basic function of any assembler it to turn asm into the equivalent binary code file; that's true for TASM, NASM, and any other assembler.

The differences arise in the special features each assembler offers you. For example, the MODEL directive exists in TASM, making it easier for the coder to reference data variables in other segments. NASM does not have an equivalent directive, so you have to keep track of the segment registers yourself, and put segment overrides where they ...
Read More >>


Keygen Coding Competition
Keygen Coding Competition
The competition was to write the smallest key generator for the simple serial scheme I wrote as a trainer for newbies.
Read More >>

IsASCII?
IsASCII?
;Summary: Routine to test whether value in AH is ASCII or not (0-127d = ASCII)
;Compatibility: All DOS versions
;Notes: 4 BYTES! Input: AH=value to check.
    cmp ah,80         ;8DFC80 Compare value in AH to 128 and set flags.
    salc         ;D6     Set AL=FF if CF=1, or set AL=0 if CF=0.
;REGISTERS DESTROYED: AL    RETURNS: AL=0 if AH is not ASCII, FF is so.

Read More >>

Using the Gnu AS Assembler
Using the Gnu AS Assembler

GAS is the GNU project port of the Unix AS assembler; it is available as part of the binutils package which is included with any of the GNU compilers (for example, GCC). GAS support is built into the various GNU compilers, and so GAS can be invoked by invoking the compiler on a .S (asm source) file; however it can also be run on any source file (for example, .asm files) by using the 'as' command.

The GAS documentation is available on Linux installations in info (.gz) format, ...
Read More >>


ENUM - A NASM macro emulating the C ENUM command
ENUM - A NASM macro emulating the C ENUM command

Read More >>

PE Program Displays Its Command Line
PE Program Displays Its Command Line
The Challenge
-------------
Write the smallest possible PE program (win32) that outputs it's command line.

Read More >>

How to Use A86 for Beginners
How to Use A86 for Beginners

I am writing this paper for I find plenty of tutorials and books all about assembly and how to write programs and how to do loops, if/else statments, etc... But one thing I did not see plenty of is tutorials on how to set up the assembler of choice that you grow fond of, for instance nasm, a86, tasm, masm GAS, etc.


Read More >>