Wednesday, 25 May 2016

MASM/TASM in Ubuntu 14.04

MASM/TASM in Ubuntu 14.04



Installing Dosbox: 

  • To install Dosbox from Ubuntu software center, go to  Ubuntu software centre and search forDosbox and click on install.                     

  •  To install Dosbox from from the repository,  open the terminal and execute the following command (make  sure that you are connected to internet)-

                                      sudo apt-get install dosbox  

 Mounting the Assembler:


  • Download the 8086 assembler (see previous post) and copy it to a required path. (eg: /home/john/)                        


  • Now open the Dosbox from dashboard and execute the following command to mount it-


                                      mount c  /home/john/8086

  • Now you can start working on TASM or MASM assembler. (see previous post)



                                   
                                 



                                 
                                

Tuesday, 5 April 2016

MASM/TASM in Windows xp/7/10

                                                 MASM/TASM in Windows 64 bit


 In Windows XP and below you can run the 16 bit DOS executables generated by MASM/TASM    directly (cmd -> MASM/TASM).

 But in Windows 7 and above you cannot start the Assembler because of incompatibility with 64 bit  versions of Windows.

 For this we need an emulator program such as DOSBOX that emulates IBM PC compatible computer running MSDOS operating system.

 Here’s how to run the MASM assembler in 64 bit editions of Windows 7 /8 using DOSBOX.

DOSBox installation:

Step1: Download and install it the latest version of  Dosbox  ( Download here).

           Now that you’ve installed DOSBox, you’ll be able to run any 16bit or 32bit DOS executable    in it.

Step3: Download the MASM/TASM Assembler here

Step4: Extract and copy the 8086 MASM/TASM Assembler folder to any of the drive (say C: \ or D:\)

            The extracted folder should contain the following files: 
      masm.exe, tasm.exe, link.exe, bin2hex.exe, exe2bin.exe, td.exe, edit.com         and debug.exe

Step5: Launch the DOSBox from desktop (double click on DOSBox 0.74 icon)

            The following window will appear 
              

             
 Step5: Mount the 8086 assembler by typing the following command:

 mount c c:\8086   [hit Enter]
 c:                [hit Enter]

          Now the contents of c:\8086 are mounted as c: drive inside the DOS emulator. You can                       assemble the assembly programs inside DOSBox as you do in  Windows XP.

Step6:

      If you are using TASM:

   edit file.asm       (to create a new  ‘file.asm’ file)
   tasm file.asm       (to assemble the above file)
   tlink file.obj      (to link the file.obj created from the above command) or(link file.obj)
   debug file.exe      (to execute the final executable in command prompt)      
   afdebug file.exe    (to execute the final executable file created in a graphical window)

     If you are using MASM:

   edit file.asm      (to create a new  ‘file.asm’ file)
   masm file.asm;     (to assemble the above file) 
   link file.obj;    (to link the file.obj created by assembling. Use ; or hit enter       3 times)
   debug file.exe     (to execute the final executable in command prompt)      
   afdebug file.exe   (to execute the final executable file created in a graphical window)


     When you are done, type exit to quit from DOSBox.