Questions tagged [a86]

A86 is a 16-bit x86 DOS assembler. It uses Intel syntax but allows some shorthand, and less boilerplate than MASM.

See https://en.wikipedia.org/wiki/A86_(software). A86 is an x86 16-bit Intel-syntax assembler that runs under DOS, and is shareware by Eric Isaacson. His A86/A386 site still exists (in 2020) and has links to docs and examples.

A86 is 16-bit only, and creates .com or object files. A386 with 32-bit support was developed later and is not shareware (last update in 2006). There is no way to assemble 64-bit instructions with A86.

A86 features include treating push and pop as pseudo-instructions that let you write multiple pushes on one line. push bx, si will assemble to two separate push instructions, for example.

A86 also allows you to omit the org 0x100 and assume directives that some other assemblers need, allowing compact source for simple .com programs.

A86 watermarks its output by choosing between which of two redundant encodings to use for op reg, reg: Difference between MOV r/m8,r8 and MOV r8,r/m8 quotes the manual.

Its syntax is similar to MASM, but mov reg, symbol can mean mov reg, immediate with the symbol address (like NASM) , depending on whether the symbol is a label or a variable. Being a one-pass assembler, leaving it implicit only works for backwards references to symbols. See A86 - definition conflicts with forward reference for example.


Eric Isaacson was one of the authors of the first x86 assembler, ASM86. A86 syntax is derived from that flavour of Intel syntax. See this answer

13 questions
4
votes
5 answers

Am I Writing Assembly Or NASM?

I'm fed up with this. I've been trying to just get a grip on assembly for awhile, but I feel like I'm coding towards my compiler rather than a language. I've been using this tutorial, and so far it's giving me hell. I'm using NASM, which may be the…
cam
  • 8,725
  • 18
  • 57
  • 81
4
votes
1 answer

Assembly A86 - Get and Display Time

I am working on an Assembly program to get system time and date, convert it to ASCII, and display it on the monitor. I am having trouble getting it to display properly and cannot find where I've gone wrong. This is for an assignment, and I'd rather…
aadria
  • 43
  • 1
  • 1
  • 4
3
votes
3 answers

Assembly popping an empty stack

I'm learning assembly and wondering what happend when you pop an empty stack or increasing SP (Stack Pointer) when it's already FFFE for example: seg1 segment org 100h pop ax mov ah,4ch int 21h seg1 ends When I run…
Andre
  • 41
  • 1
  • 6
3
votes
3 answers

A86 - definition conflicts with forward reference

I'm trying to use A86 to assemble some code for 8086. I narrowed my problem down to 4 lines of code. MOV BX, testz ADD AL, [testz] INT 20h testz: ~ ^ #ERROR 16: Definition Conflicts With Forward Reference @@@@# db ? What…
EralpB
  • 1,621
  • 4
  • 23
  • 36
2
votes
1 answer

How to respond to this error: #Error 02: Jump>128

Currently I'm working on an assembly project. For some reason I get the error: #Error 02: Jump>128. The code segment is as follows: morechar: . . . cmp dl, 0D je prep_for_write ;The error is given here …
2
votes
3 answers

print a string on two different lines

I am trying to get my program to display a string on two different lines. This is a .com program and I am using A86 assembler. jmp start ; This will start the program ;============================ msg db "Hello Word.$" ; A…
Michael
  • 315
  • 4
  • 6
  • 17
1
vote
1 answer

Assembly variable where to put?

Currently I'm learning assembly, and I'm using a86 macro assembler, Oracle VM VirtualBox. I'm wondering why do we declare or put variables in such way (after jump command)? If I declare or put the variables before jump command the program will…
Andre
  • 41
  • 1
  • 6
1
vote
1 answer

Populating an Array with 1-100 with A86 Assembly

I am trying to write an assembly program that uses a procedure to populate an array with values 1-100. The code that I have so far is as follows: jmp main first100 dw 100 dup (?) main: call prepare call populate mov ax, first100[0] call…
user2801000
0
votes
0 answers

Stop user input from stdin in Assembly

I am quite new to assembly and trying to figure out reading input from stdin. How do we terminate reading input after user presses enter ? I am using a86 in dosbox. jmp lo readChar: mov ah, 01h ; we want to read int 21h ; result in…
jdoe
  • 59
  • 10
0
votes
1 answer

Assembly Array data storing

Here is a new update on what i'm doing currently. I'm confused on how to use the data i stored in S2 to search the same word in the whole screen. If found highlight the word. DOSBOX - compiler : A86 org…
will
  • 1
  • 1
  • 3
0
votes
1 answer

Assembly A86 - Bubble Sort

I am working on an Assembly program to take in a string of characters, sort them with Bubble Sort, and output the sorted string. I do not have access to a debugger, which is why I'm having to ask for help. My program seems to be getting stuck in an…
aadria
  • 43
  • 1
  • 1
  • 4
0
votes
2 answers

What type of Assembler do I need?

I'm learning Assembly and I really like the concepts of the bare PUSH and POP instructions. I really love the low level stuff. I have been following this tutorial and this is some of the code that you can make a simple .exe out of: MOV AH,02 ;…
43.52.4D.
  • 950
  • 6
  • 14
  • 28
-1
votes
2 answers

Display the content of IP register

I need print the content of IP register. (a86). I have interrupt handler: int11: call ipp iret And procedure ipp: ipp: pop dx print dx ret And function print: print macro push ax,dx lea dx, #1 mov ah,9 int 021 pop dx,ax But it prints a lot of…
Max Zhukov
  • 877
  • 1
  • 8
  • 32