What is MIME type "text/x-tasm"?

A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.

text/x-tasm defines files that hold Turbo Assembler code. These files contain low-level assembly instructions written in plain text.
They are mainly used by programmers to write, edit, and compile assembly code using Turbo Assembler.
Files in this format typically have the extensions ASM or TASM.
For additional technical details, visit Turbo Assembler on Wikipedia.

Associated file extensions

Usage Examples

HTTP Header

When serving content with this MIME type, set the Content-Type header:


    Content-Type: text/x-tasm    
  

HTML

In HTML, you can specify the MIME type in various elements:


    <a href="file.dat" type="text/x-tasm">Download file</a>    
  

Server-side (Node.js)

Setting the Content-Type header in Node.js:


    const http = require('http');    
    
    http.createServer((req, res) => {    
      res.setHeader('Content-Type', 'text/x-tasm');    
      res.end('Content here');    
    }).listen(3000);    
  

Associated file extensions

FAQs

What is the text/x-tasm MIME type used for?

text/x-tasm is a specific identifier for source code files written for Borland's Turbo Assembler (TASM). It tells the operating system or web server that the file contains plain text assembly instructions intended to be compiled into machine code.

How do I open a file sent as text/x-tasm?

Since these files contain plain text, you can open them with any standard text editor, such as Notepad, Notepad++, or Visual Studio Code. You do not need the actual Turbo Assembler software just to view or edit the source code.

How do I configure Apache to serve .asm files as text/x-tasm?

To associate the extension with this MIME type in Apache, add the following line to your .htaccess file or main configuration: AddType text/x-tasm .asm .tasm. This ensures browsers recognize the file type correctly instead of defaulting to text/plain.

What is the Nginx configuration for text/x-tasm?

For Nginx, you should modify your mime.types file or the types block within your server configuration. Add the line text/x-tasm asm tasm; to map the extensions to the MIME type.

Will web browsers execute text/x-tasm files?

No, web browsers do not execute assembly language. If a browser encounters this MIME type, it will typically display the code as raw text or prompt the user to download the file, depending on the browser's configuration.

Is text/x-tasm a standard IANA MIME type?

No, the x- prefix indicates that it is a non-standard or experimental type. While it is widely understood in specific development circles, general assembly files are sometimes served as text/plain or text/x-asm.

Are there security risks associated with text/x-tasm files?

The file itself is just text and is safe to view. However, because TASM code is used to create low-level system programs, the compiled binary derived from the source code could potentially be malicious or harmful if executed.

General FAQ

What is a MIME type?

A MIME (Multipurpose Internet Mail Extensions) type is a standard that indicates the nature and format of a document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838.

MIME types are important because they help browsers and servers understand how to process a file. When a browser receives a file from a server, it uses the MIME type to determine how to display or handle the content, whether it's an image to display, a PDF to open in a viewer, or a video to play.

MIME types consist of a type and a subtype, separated by a slash (e.g., text/html, image/jpeg, application/pdf). Some MIME types also include optional parameters.

How do I find the MIME type for a file?

You can check the file extension or use a file identification tool such as file --mime-type on the command line. Many programming languages also provide libraries to detect MIME types.

Why are multiple MIME types listed for one extension?

Different applications and historical conventions may use alternative MIME identifiers for the same kind of file. Showing them all helps ensure compatibility across systems.