Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9259843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:45:11+00:00 2026-06-18T12:45:11+00:00

Im using Flat Assembler, and when I want to run something, it writes: illegal

  • 0

Im using Flat Assembler, and when I want to run something, it writes: ” illegal instruction” to every line of the assembler directives.
For example in the code below, it would write that .MODEL SMALL is not legal, and if id delete this line it would write that .STACK 200H is not legal and so on.

.MODEL SMALL
.STACK 200H
.DATA

.CODE
start:
    mov ax, @DATA
    mov ds, ax

    mov ax, 4c00h
    int 21h

END start

and for this code it works:

start:
    mov ds, ax

    mov ax, 4c00h
    int 21h  
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:45:13+00:00Added an answer on June 18, 2026 at 12:45 pm

    There is no one single standard about the directives of the different assemblers. There are many of them.

    The directives of FlatAssembler (FASM) are described in details in FASM programmer’s manual, which is located on public and accessible web page.

    Also, this manual should be provided for you in the downloaded package as PDF or TXT file, depending on the target OS of the package.

    It covers all assembler directives and supported instructions. There are also, many examples and if something is still not clear, you can ask on FlatAssembler message board.

    In the case of the questioned code, FASM code will look like this:

    format MZ
    entry _CODE:start
    stack 200H
    
    segment _DATA
    
    segment _CODE
    
    start:
        mov ax, _DATA
        mov ds, ax
    
        mov ax, 4c00h
        int 21h
    

    But, considering that this program is too simple to be compiled to MZ executable (which is suitable for applications with code+data bigger than 64Kbyte) I would suggest more simple COM file format to be used:

        org 100h
    
        mov ax, 4c00h
        int 21h
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to stand up a flat image using jQuery as if it was
I'm using prettify for color coding but my code is still flat and not
I am using printf via assembly code. I note that in the following example
How do you compile assembly code using Visual Studio? I want to compile and
I am using filament group flat menu. On click of first anchor, I want
How to split an IEnumerable of IEnumerables to one flat IEnumerable using LINQ (or
I'm using bcp to import a flat file into an SQL Server 2005 database.
I need to get data from flat files to DB using SSIS . The
I am writing a flat file parser that reads token/value pairs using a Scanner.
I'm looking for a simple solution using Python to store data as a flat

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.