Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

NASM version 2.09 available | A86 (Announce)

posted by Arjay, 07.09.2010, 19:58

Firstly I don't want to get into this is better than that type of discussions particularly as I'm not a fan of any particular tool; I use what is to hand.

Still just for fun I thought I would do a quick compare using your example:


> label:
LABEL is reserved word in MASM, A86, TASM? So A86 will only compiles your program if LABEL is fixed, e.g. LABEL1. The next issue is the line length is then calculated wrong-only because A86 doesn't understand the syntax you used.

However this slightly altered version compiles fine with both A86 and NASM:


org 100h

label1:
mov dx, message
mov cx, message_end - message
mov bx, 1
mov ah, 40h
int 21h

jmp short .locallabel

; The jump isn't required of course.

.locallabel:
mov ax, 4C00h
int 21h

message:
db "Now tell me this is complex syntax.",13,10
message_end:


The above version compiles to 57 bytes with both compilers (binary match).


IMHO this is a more readable version which compiles with both (note I a recent NASM version) and is 52 bytes (binary match):

org 100h

displaymsg:
  mov dx, message
  mov ah, 9h
  int 21h
  mov ax, 4C00h
  int 21h

message:
  db "Now tell me this isn't more readable!",13,10,"$"



> I don't doubt that you can write simple programs in A86 easily,
> but so can I in NASM.
I think it is important to remember you can write complex programs in pretty much anything. Obviously most of the time it makes sense to do things the easy way if easier tools exist. There are times/people who like to do things the complex way as well though. Depending on what I'm doing I can be either!

> The difference is that NASM is better at complex programs while
> still allowing the simple syntax for simple stuff.
FYI, I have used A386 (A86's brother) to write Win32 stuff quite happily. I can't compare NASM in that regards as to be honest I've not used it for Win32.

> Int21.09 but I don't like it that much.)
Any particular reason?


> I would think running on as low as an 8086 is related to it being available
> for that long too.
Well run ability shouldn't always be assumed particularly as some boxes, e.g. CPM/bespoke systems don't boot in full IBM modes or don't have them. The typewriter I mentioned for example uses a 40x3 LCD screen which operates using A000h all the time including text modes. Obviously not easy to use ;)


> Like all I've written by now, this points to A86 being outdated.
Fully agree, thus NASM is a good choice now. Still for those of us with A86 and A86 formatted code/libraries be aware we may occasionally still use it.

 

Complete thread:

Back to the forum
Board view  Mix view
22649 Postings in 2111 Threads, 402 registered users, 883 users online (1 registered, 882 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum