Showing posts with label Files. Show all posts
Showing posts with label Files. Show all posts

1 Jun 2013

DLS file layout and comments



Following format shows, how to write DLS file.

Usually program start with ".start" and following line with subroutine name

Semicolon (;) used for comments and used in end of the statements

Label         Opcode       Operands      Comments
L1               add             r1,r0,r1           ;r1++


Memory address declaration

Label:            .word    exp1
r1backup       .word    4
r1backup   reference pointer for memory address 4

Allocating empty space on DLX program

Label:      .space     expr
Array:      .space       40      ;Allocate 10 words 

Setting the program start address
                 .start expr

Example
                 .start Main ;Jump to Main
Array: .space 10*4
Index: .word 0
Main: lw r1, Index      ;Jump to here



Tags:DLS file layout and comments,DLS file layout,DLS file commands,DLX file







25 May 2013

DLS file and DLX file and commands

DLS file is Source file
File created by user and Input of Assembler DSAM

DLX file is Executable file
File created by Assembler if the file assemble. It can be run from DLX simulator

>>java -jar dasm.jar  try.dls -a
-a Program follows absolute address

>>java -jar dasm.jar  try.dls -a -l
-l List down the error & assembly of your program

>>java -jar Dsim.jar
To run simulator

Popular Posts