Journal Issues

CodeBreakers Journal

Statistics

Members: 1925
News: 291
Web Links: 1
Visitors: 3542835

Who's Online

We have 1 guest 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 Articles - Programming arrow Assembly Programming Journalarrow Issue 8 (1998-2001)
Issue 8 (1998-2001)

I cannot begin to count the number of subtle and overt hints I have received that this issue is by far the most tardy APJ release to date. Quite a few projects have conspired to steal my time away, from Linux essays to disassembler coding to reverse engineering a hardware/software combo thrown together by a madman bent on carrying the technology to his grave. Enough to say, though, that the issue is finally ready for distribution. Not only that, but I actually have about four article left over --including Part II of the ASM Gaming series-- to include in APJ 9.

The articles in this issue encompass a wide range of topics, from customizing the LCC compiler to programming games in asm. Randall Hyde, who I'm sure needs no introduction to assembly coders, has provided an excellent article discussing the teaching of assembly language, and how he developed HLA to assist. Chili has done a fair amount of work as well, working on everything from CPU identification and exception handling to preparing an online gaming article for ASCII publication.

X-Calibre has provided two complete programming packages, one for exception handling and one for converting 64-bit integers; an introductory COM article which further demystifies COM has been provided by Ernest Murphy. The Unix camp is doubly represented this month, with an introduction to FreeBSD assembly language [using NASM, of course] and my linux article deferred from the previous issue. Capping everything off is a quick challenge and solution provided by Angel Tsankov.

It has been suggested to me many times during the Time Of No Issues that I should acquire a staff for ensuring that the issues get out on time. I am open to suggestions in this area; anyone willing to volunteer their time on a regular basis is welcome to contact me. Ideally, the mag should have a staff that solicits articles [hint IRC hint], tests the code in each article, and edits the articles to enforce formatting [80 col, 3sp tab] and commenting standards. To date I've been doing the last one only, and as is readily apparent I put it off as long as possible.

Another note, regarding mirrors. Translation of the APJ issues is perfectly acceptable and highly encouraged; all I request is an email giving the URL so I can link to it from the main page. I should point out that the individual articles, once removed from the context of the APJ issue, are the property of their individual authors, so contact them before 'repackaging'. Regarding formatting, I have also received a few requests to reformat APJ in HTML or another markup language to make reading and browsing easier. This I will not do, for it makes APJ less portable and causes problems copying code from the magazine to a source file. I have been working on syntax highlighting/tag files for vi and nedit; I will post these and any user-contributed translation files [e.g. APJ_to_HTML] on the main APJ website.

All pleading and excuses aside, issue 8 is now put to bed, and issue 9 will be out faster than you can recite GNU's license agreement. Enjoy the mag...

_m


SEH.INC
SEH.INC

Read More >>

Processor Identification - Part II
Processor Identification - Part II

In the first part of this article I'll explain a lot of different ways to check for older processors by exploiting bugs, undocumented features, etc. I'll also show how to write an invalid-opcode exception handler, calculate the size of the prefetch queue and some other things. Finally, in the last part Chris shows how to determine the processor clockrate with the RDTSC instruction.

Chris didn't have much free time at the moment and so couldn't contribute more, the...
Read More >>


The LCC Intrinsics Utility
The LCC Intrinsics Utility
Lcc-win32 is a free C compiler system. It features an IDE, a resource compiler, a linker, librarian, a windowed debugger, and other goodies.

Read More >>

Loadable Kernel Modules
Loadable Kernel Modules

If there is one area in linux that is sure to attract assembly language coders, it is the coding of loadable kernel modules; after all, asm programmers aren't known for waiting around in Ring 3 space waiting for the CPU to assign their process some resources.

Kernel modules are Ring 0 programs that are dynamically linked into a running kernel; they require LKM support in the kernel [ CONFIG_MODULES ]. Each kernel ships with a given number of kernel modules, as most device drivers...
Read More >>


Teaching Assembly Language Using HLA
Teaching Assembly Language Using HLA

I first began teaching assembly language programming at Cal Poly Pomona in the Winter Quarter of 1987. I quickly discovered that good pedagogical material was difficult to come by; even the textbooks available for the course left something to be desired. As a result, my students were learning very little assembly language in the ten weeks available to the course. After about two quarters, I decided to do something about the textbook problem, so I began writing a text I entitled...
Read More >>


Win32 ASM Game Programming - Part 1
Win32 ASM Game Programming - Part 1

[This series of articles was first posted at GameDev.net and is now being published here with the author's permission. Here is Chris Hobbs' introduction on this particular article:

"A tutorial series on the development of a complete game, SPACE-TRIS, in pure ASM. This one covers the design document, code framework, and some Win32 ASM basics."

Visit his website at {http://www.fastsoftware.com.} Preface, Html-to-Txt conversion and formating by Chili ]

...

Read More >>

System Calls in FreeBSD
System Calls in FreeBSD
Assembly language programing under Unix is highly undocumented. It is generally  assumed that no one would ever want to use it because various Unix systems run  on different microprocessors, so everything should be written in C for portability.

Read More >>

Accessing COM Objects from Assembly
Accessing COM Objects from Assembly

The COM (Component Object Model) is used by the Windows Operation system in increasing ways. For example, the shell.dll uses COM to access some of its API methods. The IShellLink and IPersistFile interfaces of the shell32.dll will be demonstrated to create a shortcut shell link. A basic understanding of COM is assumed. The code sample included is MASM specific.


Read More >>

Challenge
Challenge
Challenge
---------
Write as short as possible program to convert a two-digit BCD to hexadecimal;
that is, the decimal representation of the output must represent the
hexadecimal representation of the input.

Solution
--------
The solution, in 14 bytes:
    ;Input  AL = (A * 16) + B
    ;Output AL = (A * 10) + B
    88 C4      MOV  AH, AL       ;AH = AL
    82 E4 F0   AND  AH, 0F0h     ;AH = (A * 16)
    D0 EC      SHR  AH, 1        ;AH = (A * 8)
    28 E0      SUB  AL, AH       ;A...

Read More >>

Win32 AppFatalExit Skeleton
Win32 AppFatalExit Skeleton
This is just a Win32 application  skeleton with a small procedure  that manages fatal errors,  by displaying  an information  message box  and terminating  the process.

Read More >>

64-bit Integer/ASCII Conversion
64-bit Integer/ASCII Conversion

The following routines provide an assembly-language library for converting 64-bit integers to and from ASCII, such as would be required when preparing user-supplied data for qword arithmetic or FPU instructions. The library consists of the routines ParseRadixSigned, ParseRadixUnsigned, PrintRadixSigned, and PrintRadixUnsigned, and the macro Divide64. Wrappers for calling the routines from C code have also been provided.


Read More >>