mark r rivet wrote:
> I'm new to assembly programming except for z80 coarse I took in the
> 80's. So I downloaded: Nasm, Nasmide, Alink and have the book
> "Assembly Language step by step with Dos and Linux". Is this good or
> do I need something else.
It's good. NasmIde is a little "dated"... if it doesn't work on a modern
OS, you can use any editor you're familiar with, and not lose too much.
> Any suggestions will be helpful.
At one time, there were a couple errors in Jeff's code, as available for
download. I don't know if they're in the code you get with the book. If
you should have trouble with it, try these fixes:
diff -u orig/eat3.asm ./eat3.asm
--- orig/eat3.asm Sun Dec 12 14:18:02 1999
+++ ./eat3.asm Mon Jan 28 19:41:28 2002
@[EMAIL PROTECTED]
-110,7 +110,7 @[EMAIL PROTECTED]
ClrScr:
mov CX,0 ; Upper left corner of full screen
- mov DX,LRXY ; Load lower-right XY coordinates into DX
+ mov DX,[LRXY] ; Load lower-right XY coordinates into DX
ClrWin:
mov AL,0 ; 0 specifies clear entire region
ScrlWin:
diff -u orig/eat5.asm ./eat5.asm
--- orig/eat5.asm Sun Dec 12 14:25:04 1999
+++ ./eat5.asm Mon Jan 28 21:09:18 2002
@[EMAIL PROTECTED]
-15,7 +15,7 @[EMAIL PROTECTED]
[SECTION .text] ; Section containing code
-%include "BOOK\MYLIB.MAC" ; Load in screen control macro library
+%include "MYLIB.MAC" ; Load in screen control macro library
START: ; This is where program execution begins:
diff -u orig/info.asm ./info.asm
--- orig/info.asm Sun Dec 12 14:29:22 1999
+++ ./info.asm Mon Jan 28 20:44:00 2002
@[EMAIL PROTECTED]
-21,7 +21,7 @[EMAIL PROTECTED]
START: ; This is where program execution begins:
call VidCheck ; Initialize all video information variables
- Clear VidSegment,ClearAtom,VidBufSize ; Clear the screen
+ Clear VidOrigin,ClearAtom,VidBufSize ; Clear the screen
; Here we display the name of the program and its author:
Writeln IDString,LIDString ; Display the program name
@[EMAIL PROTECTED]
-274,8 +274,8 @[EMAIL PROTECTED]
; system and are initialized by the VidCheck procedure:
;---------------------------------------------------------------
DispType DB 0 ; Code for display adapter type
-VidSegment DW 0B000H ; Segment of installed display buffer
VidOrigin DW 0 ; Offset for FAR pointer to refresh buffer
+VidSegment DW 0B000H ; Segment of installed display buffer
VisibleX DB 80 ; Number of columns on screen
VisibleY DB 25 ; Number of lines on screen
VidBufSize DW 4000 ; Default to 25 X 80 X 2 (char & attribute)
diff -u orig/mylib.mac ./mylib.mac
--- orig/mylib.mac Mon Sep 20 12:04:08 1999
+++ ./mylib.mac Mon Jan 28 20:58:40 2002
@[EMAIL PROTECTED]
-32,8 +32,8 @[EMAIL PROTECTED]
;---------------------------------------------------------------
%macro Clear 3 ;VidAddress,ClearAtom,BufLength
les DI,[%1] ; Load ES and DI from FAR pointer
- mov AX,%2 ; Load AX with word to blast into memory
- mov CX,%3 ; Load CX with length of buffer in bytes
+ mov AX,[%2] ; Load AX with word to blast into memory
+ mov CX,[%3] ; Load CX with length of buffer in bytes
shr CX,1 ; Divide size of buffer by 2 for word count
cld ; Set direction flag so we blast up-memory
rep stosw ; Blast away!
Looks like incomplete "translation" from the Masm syntax of the First
Edition, I think. This was a while ago... may have been fixed.
> Also I am
> in the process of reading the FAQ.
Good idea... but that's a little "dated", too...
"Step by Step" gets into 32-bit code a little, in the Linux part, but is
mostly 16-bit. For an introduction to 32-bit programming, you might like:
http://www.drpaulcarter.com/pcasm
When you're ready to try some Windows code, you can get the include
files, etc. that you'll want at the NasmX project:
http://www.asmcommunity.net/projects/nasmx
If you're seduced by Linux instead:
http://linuxassembly.org
or http://asm.sf.net
Or:
http://members.save-net.com/jko%40save-net.com/asm/
Start off "Step by Step" and see where it takes you!
Best,
Frank


|