HOW 2 ASSEMBLE ASM???

Discussion in 'Video - Software discussion' started by qwerttyp, Sep 30, 2006.

  1. qwerttyp

    qwerttyp Member

    Joined:
    Apr 30, 2005
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    16
    HOW DO I ASSEMBLE ASM???
     
  2. celtic_d

    celtic_d Regular member

    Joined:
    Jan 23, 2005
    Messages:
    3,352
    Likes Received:
    0
    Trophy Points:
    46
    Generally nasm or yasm.
     
  3. qwerttyp

    qwerttyp Member

    Joined:
    Apr 30, 2005
    Messages:
    51
    Likes Received:
    0
    Trophy Points:
    16
  4. MoZo1

    MoZo1 Member

    Joined:
    Jun 12, 2005
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    16
    Under DOS 6.22 and 386 comp CPU, you need an assembler program (like TASM - Turbo Assembler), then use the corresponding command line syntax, usually found in a txt file with it, and then you will get back an exe/com file, or an erro mesage. Also you have to use a corresponding header, diferent from one assembler version from another. Same things with all: you have to set cs and ds. Usually you set cs in the head, and ds in the first code line.
    Example for TASM syntax - small program, wait for a key using DOS interrupts then exit:
    Code:
    kilep	segment
    	assume cs:kilep
    
    start:  mov ax,kilep	;|ds regiszter be llŤt sa a szegmens elej‚re
    	mov ds,ax	;|
    	
    	xor ax,ax	;|billenty–v r s
    	int 16H		;|
    
    	mov ax,4c00H	;|kil‚p‚s
    	int 21H		;|
    
    kilep	ends
    	end start
    
    comment: it doesn't use variables, so it doesent use ds, the setting is just a formal thing here.
     

Share This Page