guys?i need myself to make a project using tasm to be passed next week on friday.
what i ve learn so far are int 21 and slight of int 10..but will learn most if needed in my project..i was thinking of file manager?is it complex to make or not?my teacher was asking for a complex one.
thanks for any suggestion..

What week in school of how many weeks?

Can you turn on graphics mode and paint pixels yet?

If so, that opens the window for many possibilities!


Years ago for my Final Assembly Language project, I chose a circle and line drawing algorithm using self modifying code and the Bresenham DDA algorithm. This was on a now old Monochrome Hercules Graphics card. Nowdays you can't easily do self modifying code due to the caches, which were introduced on later processors but didn't exist on the original 80x86 and 286 processors.

If I were to pick a new project today it would be one that I did in BASIC many years ago, and then rewrote again in C when it first came out. A hiresolution randomly generated maze with a pixel mouse to traverse it! Pretty cool looking!

But a simple task to do in assembly once you have the algorithm worked out!

Edited 7 Years Ago by wildgoose: n/a

A file-manager is a nifty idea for a project,
the complexity of the project will depend on your choice
of a user-interface.
Copying,Moving/Renaming,Deleting,Changing/Retrieving the attributes
of,retrieving and setting date/time of files can all be accomplished
with INT 21h function calls.
I believe the same date/time format for FCBS is used
by dos file handle functions that set and retrieve the
date and time of a file.
The most important of all will be the use of FindFirst(4Eh) and
FindNext(4Fh) which writes a FileInfo structure to the
current DTA (the default is offset 80h in the PSP).
They search the current directory for entries and
return the found file's/directory's attributes,name,etc...
A pathname with optional wildcards and the file attributes
are passed to function
4Eh and 4Fh is used to finish searching the directory entries
according to the parameters to 4Eh.

You could make a list of files that can be moved down
using the arrow keys and have commands to perform
functions on them (like changing the current directory).

But the choice of an interface is up to you...
Good luck!

Edited 7 Years Ago by NotNull: n/a

thanks guys..ill try to do any of those you said,but before that i encountered a problem with tasm it did compile and link the obj file but when exe? no output at all..

mov ah,1
int 21h

that was the code that cant even executed..even the the basic code like get time date etc..
a pop-up came up which says NTDVM CPU has encountered an illegal instruction
CS:1205 IP:0101 OP:63 fb 63 1e09 Choose 'Close' to terminate the application..I need help guys..
before this happen i was playing with int 21 and and int 10..i set row and column then place the get date of int 21..
then an error occured..thanks for any help..

Edited 3 Years Ago by pritaeas: fixed formatting

mov ah, 0x1 ; Read Key w/ Echo
int 0x21

Is this the full code?
If so add:

int 0x20 ; Termination Interrupt
;or this
mov ax,0x4c00 ; Terminate Program Return Value in AL
int 0x21

to the end.
If the processor executed an illegal instruction it looks
like the instruction pointer ran into junk.
Your generating a 16-bit exe file?
Try making a bare binary .COM
If it is an .EXE make sure the entry point got set
up right in the header.
debug myexe.exe
-r
... will show IP's initial value
-u
... will show dissassembly of code at IP
Make sure it is the code you entered.
There's a lot of other points to be made about
generating .EXE programs, but the syntax
is usually different from assembler to assembler,
and I do not use TASM.

yea thanks man..i figured that out aswell forgot my basics in asm..but i was wondering how i run my get date program in tasm..
i use

mov ah,2Ah
int 21h

mov ah,4ch
int 21h

when i executed it nothing happen but my date .exe before run..
the code i place in date.asm was change..
well i have no choice but to use tasm since its what my teacher is requiring..cant even even use emulator for my program..do u guys have an idea how to combine asm codes and c or c++..i think that could be allowed my professor..btw i have one question,, can you combine interrupts lets say like int 10 and int 21?cause in int 10 you can move the cursor location anywhere in the screen

mov dl,10
mov dh,10
int 10h

mov ah,2
mov dl,'A'
int 21h

is the code given above right?i just dont want to wreck my laptop..just being cautious..thanks..

mov ah, 0x2 ; Set Cursor Position
mov bh, 0x0 ; Display Page Zero
mov dh, 0x3 ; row 4 cuz rows/cols start
                    ; at zero with AH=2
mov dl, 0x3  ; col 4
int 0x10 ; BIOS Video Services Interrupt
mov dl, 0x41 
mov ah, 0x2 ; Console Output
int 0x21
; prints an 'A' at row 4 col 4

Alot of screwy code in the DOS Box of Windows
doesn't usually damage the computer,
expect when handling files.
But I'm not too sure about that, but happens all the time
in my DOS Box.

Oh yeah, and for function 2Ah GetDate:
INT 21 - DOS 1+ - GET SYSTEM DATE
AH=2Ah
Return:CX=Year (1980 - 2099)
DH=Month (1=Jan,2=Feb,etc.)
DL=Day (1-31)
AL=Day of week (0=Sunday,1=Monday,etc.)

Edited 7 Years Ago by NotNull: n/a

ok thanks man..btw for the date code.i did it like this

mov ah,2Ah
int 21h

ok lets assume i place that code and the terminate int 20 at the bottom..
how come when i execute it nothing seems to show up?i meant i cant see the date..but i know i made that code before and it works before though...any idea what happen?

Edited 7 Years Ago by jingo1126: n/a

ok now im starting with my code user interface should be the last atleast since i need to work with my codes first at file managing..
i found out this code for creating a file..

;mov cx, 0       ;  normal - no attributes. 
 ;mov cx, 1       ;  read-only. 
 ;mov cx, 2       ;  hidden. 
 ;mov cx, 4       ;  system 
 ;mov cx, 7       ;  hidden, system and read-only! 
 ;mov cx, 16      ;  archive 
	
.model small
.stack 100h
.data
        FileName db "myfile.txt", 0 
.code
start:
creatfile:        
        mov ah, 3ch
	mov cx, 0
	mov dx, offset FileName
	mov ah, 3ch
	int 21h
	jc err
	mov handle, ax
	jmp k
	
	handle dw ? ;anyone knows what does this code mean? 
	err:              ;
	; ....             ;
	k:                 ;
mov ah,4ch ; terminate program
int 21h
end start

ok does that code with handle dw ? mean that it will delete the file with the same name?i mean like paste and replace the file?
Thanks..

ok i use the following codes

mov ah, 3ch              
mov cx, 0
mov ax,seg createfile1
mov ds,ax
mov dx,offset createfile1
mov ah, 3ch
int 21h
jc err
mov ax, handle ;error says Forward reference needs override.
jmp k
handle dw ?
err:                   ;warning. reserved word used as symbol:ERR
; .... 
k:

ok i got an error when i was compiling my work..can any1 help me through this..
i mean i just follow what the net says when using 3ch..need help..

Too early in the morning for me to see why you're getting a compile error,
however

You just got the file handle in ax from the DOS operation...
;;mov ax, handle ;error
mov handle,ax ; Save handle

I didn notice you've altered your DS: register. Is handle in the same segment? If not

mov cs:handle,ax

ok here is my whole code i still receive the same error..the whole code aint finish yet im still figuring how to get this error done before i do others..
error is on line 54 and warning is on line 59..
thanks

.model small
.stack 100h
.data
msg1 db "Rodriguez File Manager ver 1.0.0",0dh,0ah,"______________________________________",0dh,0ah,"1 - Create Directory",0dh,0ah,"2 - Make Normal File",0dh,0ah,"3 - Make Hidden File", "$"
filepath db "d:FileMngr\Folder",0
mkePath db "d:FileMngr",0

.code

start:
mov ax,seg msg1			;This will print the msg1 declared at .data
mov ds,ax
mov dx,offset msg1
mov ah,9
int 21h
mov dl,0ah				;linefeed

MakePath:
mov ax,seg mkepath      
mov ds,ax
mov dx,offset mkepath
mov ah,39h				;make directory at d:
int 21h	



key_1:      
mov ah,7				;press 1 to jmp directory at d:FileMngr
int 21h

cmp al,"1"
je crtFilePath

cmp al,"2"
je createFile

crtFilePath:
mov ax,seg filepath    
mov ds,ax
mov dx,offset filepath
mov ah,39h              ;create folder at d:FileMngr\ 
int 21h




createFile:
mov ah, 3ch
	mov cx, 0
	mov dx, offset filename
	mov ah, 3ch
	int 21h
	jc err
	mov handle, ax
	jmp k
	filename db "myfile.txt", 0
	handle dw ?
	err:
	; .... 
	k:
	ret
	finish:
mov ah,4ch
int 21h
end start

Try placing the memory variables 'filename' and 'handle'
in the .data section.
Line 16: You don't print out your line-feed.
If you want to goto the beginning of the next line,
print a carriage-return (0dh) and a line-feed (0ah).
This is because line-feed (0ah) causes the hardware cursor
to go one row down and carriage-return (0dh) causes
the hardware cursor to move to the beginning of the current
row.

Edited 7 Years Ago by NotNull: n/a

A project i had in mind for learning a few things in assembly is redoing some UNIX commands in assembly.

Oh yeah, JINGO1126
The DOS GetDate function does not display the
date on the console, but returns the current date
as values in registers to the calling program.
If you want to display these values you'll have to print them
yourself.

ok thnks man.. had it working before notnull..im done with my project anyway..putting painted pixels was easy when you figure out how to do it..now i have to wait for my defense of my project..hope i pass this one..

This article has been dead for over six months. Start a new discussion instead.