Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Assembly x86 > Re: Am I on the...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 11 Topic 4608 of 4728
Post > Topic >>

Re: Am I on the right track?

by Frank Kotler <spamtrap@[EMAIL PROTECTED] > Apr 8, 2008 at 02:32 AM

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
 




 11 Posts in Topic:
Am I on the right track?
mark r rivet <spamtra  2008-04-07 23:11:59 
Re: Am I on the right track?
Frank Kotler <spamtra  2008-04-08 02:32:13 
Re: Am I on the right track?
mark r rivet <spamtra  2008-04-09 02:07:36 
Re: Am I on the right track?
ArarghMail804NOSPAM <s  2008-04-08 22:41:27 
Re: Am I on the right track?
mark r rivet <spamtra  2008-04-09 10:47:33 
Re: Am I on the right track?
Dirk Wolfgang Glomp <  2008-04-09 08:39:06 
Re: Am I on the right track?
mark r rivet <spamtra  2008-04-09 10:59:30 
Re: Am I on the right track?
Frank Kotler <spamtra  2008-04-10 00:38:15 
Re: Am I on the right track?
Frank Kotler <spamtra  2008-04-10 00:39:45 
Re: Am I on the right track?
Frank Kotler <spamtra  2008-04-10 00:46:49 
Re: Am I on the right track?
Cranky <spamtrap@[EMA  2008-04-09 13:38:28 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 0:31:15 CDT 2008.