Journal Issues

CodeBreakers Journal

Statistics

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

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 Assembly Programming Journalarrow Issue 7 (1998-2001)
Issue 7 (1998-2001)

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

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

What? Late again? Wasn't there going to be a December issue?

Well, yeah, there was; unfortunately once again real-world concerns interfered with timely distribution. And, as usually happens with late issues, this one is waaaaay oversized, almost 200K due to all the articles I crammed into it. I didn't even get a chance to include my linux kernel modules article...

This issue seems to have a bit of a 'Hex-to-ASCII' bent to it, mostly from the snippets but also from the conversion routines offered by Chris and Laura. In addition, some 'fringe' asm has been supplied with Jan's Modula article, along with an introduction to Alpha assembly language by Rudolph Seeman. Konstantin Boldyshev, who helps maintain the linuxassembly.org site, continues the Unix trend with an introduction to frame-buffer programming under linux.

The two leading articles are both quite large and offer a wealth of information for the beginning and experienced asm programmer. Digital Alchemist has produced a work on applying virus techniques to non-destructive applications, and S. Sirajudeen has tackled the huge problem of creating a decent UI in console-mode programs.

In this issue I have tried to leave the code comments as untouched as possible; the coding styles of the authors vary quite widely, and each clearly demonstrates the planning behind the program itself -- showing how the algorithm was conceived before implementation. Stripping any of these examples of all but comments will soon reveal the worksheet used by the coders to develop their programs.

Finally, I have taken to formatting these issues in Vim under linux; to check margins and pagination I have begun proofing them in Netscape and WordPerfect [10 pt Courier, natch]; they should view fine in any web browser and in most word processors; to those stuck with Notepad or Edit.com ... my apologies.

_m


TOHEX
TOHEX

Read More >>

Converting Strings to Numbers
Converting Strings to Numbers
Many programs require user input, which is often numbers. For this purpose there are library functions, like for example sscanf() in C. But in assembly all has to be done by hand, even under Windows (with the exception of edit controls - GetDlgItemInt() function).

Read More >>

Using the RTC
Using the RTC
Here are some routines to use the RTC/CMOS chip for serious timing. It's an introductory tutorial, so you'll be given more than enough opportunity to experiment with timing via this method.

Read More >>

MMX ltostr
MMX ltostr

Read More >>

List Scan Library Routine
List Scan Library Routine
Firstly let me introduce an auxillary routine this uses. It is called 'scaws' and scans past white space. It is very simple, and the definition of whitespace here is SPACE (020h) or TAB (09h):-

Read More >>

Creating a User-Friendly Interface
Creating a User-Friendly Interface

Now a days, a programmer of any language has to include user friendly features in his commercial software, since users desire user friendliness for easy use. For example, Windows is the most popular OS due to its Graphical User Interface.


Read More >>

Inline Assembler With Modula
Inline Assembler With Modula

I don't want to start a compiler-war in the assembler programmer's journal, but I do want to show some nice in-line assembly routines for FST Modula-2. FST (or Fitted Software Tools) was a shareware Modula-2 compile made by Roger Carvalho. He eventualy gave up the concept of shareware and made his final version freeware. If you look carefully you can find this package in many software repositories like Simtel. Also the FreeDOS website used to harbor this final version.


Read More >>

Hex2ASCII
Hex2ASCII

Read More >>

Enter fbcon
Enter fbcon
Many of Linux users have heard something about fbcon. It is becoming more and more popular, mostly because of capability of getting graphics on usual terminal without X. How to use graphic capabilities of fbcon?

Read More >>

Extending DOS Executables
Extending DOS Executables

The reason behind this essay is to show how techniques first developed by virus writers can be used for benevolent purposes. It is my opinion that all knowledge is good and viral techniques are certainly no exception. I will lead you through the development of a program called DOSGUARD which benignly modifies DOS executables, both COM and EXE.


Read More >>

Direct Draw Examples
Direct Draw Examples

As a follow-up to the Direct Draw article in APJ#5, here are two complete DirectDraw sample programs. The first uses an 8-bit palette, while the second uses a 32-bit (truecolor) palette. To compile these, you will need to obtain Ddraw.inc ( {http://asmjournal.freeservers.com/files/Ddraw.inc.html} ) for the necessary DirectDraw definitions.


Read More >>

Chaos Animation
Chaos Animation

To assemble this program you are going to require most of the library routines I have so far presented here. You can consider this an example in just how easy it is to write software in assembler if you continue to build and refine a library system. The program probably took me about half an hour of work and most of that was making myself satisfied with the niceness of the code:-


Read More >>

Challenge
Challenge

Write a program that takes a snapshot of a text screen and writes it to a file. It should work in any text mode and lines should be terminated with newlines in the file so that it can easily be viewed in a standard editor. ( 04Dh = 77 bytes )


Read More >>

ASM Building Blocks
ASM Building Blocks

Here are some simple but very powerful library routines, primarily concerned with screen output. They all follow the same conventions:

  • Routines preserve all registers that they are not specified to return.
  • The direction flag (DF) should always be clear before calling.

All code is presented in MASM format. I do not use very many of the functions of this assembler so it should be trivial to assemble these under a different one. I do, however, use OPTION SCOPED, this means ...
Read More >>


Assembly on the Alpha Platform
Assembly on the Alpha Platform

ASSEMBLING ON ALPHA PART I

In this first article I will discover how to use functions written in alpha assembler in a program written in C. The example I give is a rather simple one. There are many things to know about alpha. This text shows that it is quite simple to use assembler on alpha.


Read More >>