any project in mind?
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..
jingo1126
Junior Poster in Training
57 posts since Aug 2009
Reputation Points: 10
Solved Threads: 1
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!
wildgoose
Practically a Posting Shark
896 posts since Jun 2009
Reputation Points: 546
Solved Threads: 99
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..
[code]
mov ah,1
int 21h
[code]
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..
jingo1126
Junior Poster in Training
57 posts since Aug 2009
Reputation Points: 10
Solved Threads: 1
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..
jingo1126
Junior Poster in Training
57 posts since Aug 2009
Reputation Points: 10
Solved Threads: 1
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?
jingo1126
Junior Poster in Training
57 posts since Aug 2009
Reputation Points: 10
Solved Threads: 1
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..
jingo1126
Junior Poster in Training
57 posts since Aug 2009
Reputation Points: 10
Solved Threads: 1
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..
jingo1126
Junior Poster in Training
57 posts since Aug 2009
Reputation Points: 10
Solved Threads: 1
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
wildgoose
Practically a Posting Shark
896 posts since Jun 2009
Reputation Points: 546
Solved Threads: 99
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
jingo1126
Junior Poster in Training
57 posts since Aug 2009
Reputation Points: 10
Solved Threads: 1
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..
jingo1126
Junior Poster in Training
57 posts since Aug 2009
Reputation Points: 10
Solved Threads: 1