jingo1126 0 Junior Poster in Training

first things first..i still have my exe file that the program works..
i was just putting labels to my program then the next thing happens it does not work anymore except for the terminate program..
if some of you guys have time please recomplie it and test it in your tasm.. these are all my codes.. please help me

;Jingo Rodriguez
;Project Partial File Manager Creates File, Directory and Deletes
;has better interface except no int on keyboard and and mouse int whch are 16 and 33
;ints use are 10h and 21h
;one flaw in program is you have to execute it again when an error is made..like wrong spelling and wrong input of data at the beginning..just like the one your experiencing in wrong or false use of program
.model small
.stack 100h
.data
buffer db 10,?, 10 dup(' ')
handle dw ?
.code
start:
call clear					;call clear procedure call is placed when theres a certain procedure to be called
started:
mov ah,1					;service 1h is character input with echo
int 21h
push ax						;stores value at ax for further use

pop bx                      ;gets the value from stack for usage now the stack is emptied...

cmp al,"F"                  ;checks if the desired character has been input if not proceeds to then next line till it gets the desired input then jumps to a procedure or label
je file						;use je instead of call why?because call may run the procedures leaving other procedures useless.

cmp al,"o"					;" "
je folder

cmp al,"D"					;" "
je deletes

cmp al,"x" 					;jumps to finishs			
je finishs

file proc					
		mov dl,0ah          ; linefeed
		mov ah,2            ; service 2h character output
		int 21h  
		mov ax,seg buffer           
		mov ds,ax                   
		mov dx, offset buffer
		mov ah, 0ah			; string input is what ive learned most in this program then storing it at stack
		int 21h
		push ax				; string stored at stack		
		jmp print
		print:				; print what is been inputed maybe need or may not be needed at all.
		xor bx, bx
		mov bl, buffer[1]
		mov buffer[bx+2], '$'
		mov dx, offset buffer + 2
		mov ah, 9           ; service 9h is for string output
		int 21h
crtfle:
mov ah,3ch
mov cx,0		  ;  is best use to check if the 3ch service is working..change maybe done if neccessary for the program
 ;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 
pop bx						
mov ah,3ch
int 21h
mov handle, ax              
jmp finish
file endp					
folder proc
		mov dl,0ah		  	;linefeed
		mov ah,2    		;service 2h character output
		int 21h                    
		mov ax,seg buffer  
		mov ds,ax
		mov dx, offset buffer  
		mov ah, 0ah         ;service use are 0ah of int 21h: is use to input string
		int 21h
		push ax             ;after input string will be push to register ax
		jmp print1
		print1:             ;code is to print the string after input
		xor bx, bx
		mov bl, buffer[1]
		mov buffer[bx+2], '$'
		mov dx, offset buffer + 2
		mov ah, 9
		int 21h
		pop bx
		mov ah,39h           ;create folder at current directory
		int 21h
		jmp finish
		finishs:             ;this jumps are made due to the fact they can't jump a long jump that exceeds at 128 bytes..
		jmp finish           ;short jmps are but will make it a bit slower due to some sources i found on the net
		deletes:       	     ;this jump will jump from one another till it goes to the desired procedure or label.
		jmp delete
folder endp
delete proc
		mov dl,0ah			 ;linefeed
		mov ah,2             ;service 2h character output
		int 21h
		mov ax,seg buffer  
		mov ds,ax
		lea dx, buffer  
		mov ah, 0ah          ;service use are 0ah of int 21h: is use to input string
		int 21h
		push ax              ;after input string will be push to register ax
		jmp print2
		print2:                      ;code is to print the string after input
		xor bx, bx
		mov bl, buffer[1] 
		mov buffer[bx+2], '$'
		mov dx, offset buffer + 2
		mov ah, 9
		int 21h
		pop bx
		mov ah,41h           ;delete file at current directory
		int 21h
        jmp finish
delete endp
Clear proc ;only a design for better viewing..UI(User interface)
;learning putting color at specific places at screen is nice, screen of dos has only 80 pixels width
;ok i can understand almost everyline except for the two line below 
;which means i guess they might come in handy for some reasons maybe trying to remove something place at stack so that when procedure is being called it has a clean data to throw in the process.
; set es (just in case): 
push    cs
pop     es

mov     bh, 0    ; page. 
lea     bp, tmsg  ; offset. 
mov     bl, 01fh ; default attribute. 
mov     cx, 80   ; char number. 
mov     dl, 0    ; col. 
mov     dh, 0    ; row. 
mov     ah, 13h  ; function. 
mov     al, 1    ; sub-function. 
int     10h

mov     bh, 0    ; page. 
lea     bp, msg  ; offset. 
mov     bl, 01fh ; default attribute. 
mov     cx, 80   ; char number. 
mov     dl, 0    ; col. 
mov     dh, 1    ; row. 
mov     ah, 13h  ; function. 
mov     al, 1    ; sub-function. 
int     10h


mov     bh, 0    ; page. 
lea     bp, cmsg ; offset of string with attributes. 
mov     bl, 01fh ; default attribute (not used when al=3). 
mov     cx, 80   ; char number. 
mov     dl, 0    ; col. 
mov     dh, 2    ; row. 
mov     ah, 13h  ; function. 
mov     al, 1    ; sub-function. 
int     10h


mov     bh, 0    ; page. 
lea     bp, opt1 ; offset of string with attributes. 
mov     bl, 01fh ; default attribute (not used when al=3). 
mov     cx, 8   ; char number. 
mov     dl, 22    ; col. 
mov     dh, 3    ; row. 
mov     ah, 13h  ; function. 
mov     al, 3    ; sub-function. 
int     10h

mov     bh, 0    ; page. 
lea     bp, opt2 ; offset of string with attributes. 
mov     bl, 01fh ; default attribute (not used when al=3). 
mov     cx, 9   ; char number. 
mov     dl, 30   ; col. 
mov     dh, 3    ; row. 
mov     ah, 13h  ; function. 
mov     al, 3    ; sub-function. 
int     10h
mov     bh, 0    ; page. 
lea     bp, opt3 ; offset of string with attributes. 
mov     bl, 01fh ; default attribute (not used when al=3). 
mov     cx, 8   ; char number. 
mov     dl, 37    ; col. 
mov     dh, 3    ; row. 
mov     ah, 13h  ; function. 
mov     al, 3    ; sub-function. 
int     10h

mov     bh, 0    ; page. 
lea     bp, opt4 ; offset of string with attributes. 
mov     bl, 01fh ; default attribute (not used when al=3). 
mov     cx, 8    ; char number. 
mov     dl, 45   ; col. 
mov     dh, 3    ; row. 
mov     ah, 13h  ; function. 
mov     al, 3    ; sub-function. 
int     10h

mov     bh, 0    ; page. 
lea     bp, left ; offset of string with attributes. 
mov     bl, 011h ; default attribute (not used when al=3). 
mov     cx, 22   ; char number. 
mov     dl, 0    ; col. 
mov     dh, 3    ; row. 
mov     ah, 13h  ; function. 
mov     al, 1    ; sub-function. 
int     10h

mov     bh, 0    ; page. 
lea     bp, right ; offset of string with attributes. 
mov     bl, 011h ; default attribute (not used when al=3). 
mov     cx, 27   ; char number. 
mov     dl, 53   ; col. 
mov     dh, 3    ; row. 
mov     ah, 13h  ; function. 
mov     al, 1    ; sub-function. 
int     10h

mov     bh, 0    ; page. 
lea     bp, inst  ; offset. 
mov     bl, 01fh ; default attribute. 
mov     cx, 80   ; char number. 
mov     dl, 0    ; col. 
mov     dh, 4    ; row. 
mov     ah, 13h  ; function. 
mov     al, 1    ; sub-function. 
int     10h
ret  ; return control to the operating system
tmsg db '                                                                                 ' ;design top most of the screen

 msg db 'Rodriguez File Manager Version 0.1.1                                             ' ;design second to the top followed by the rest
        
cmsg db  '__________________________C h o o s e  a n  O p t i o n__________________________'
     
opt1  db ' ',01fh, 'F',003h, 'i',030h, 'l',030h, 'e',030h, ' ',01fh, ' ',01fh ,' ',01fh
opt2  db 'F',030h, 'o',003h, 'l',030h, 'd',030h, 'e',030h, 'r',030h ,' ',01fh ,' ',01fh
opt3  db ' ',01fh, ' ',01fh, 'D',003h, 'e',030h, 'l',030h, 'e',030h, 't',030h, 'e',030h 
opt4  db ' ',01fh, ' ',01fh, ' ',01fh, 'E',030h, 'x',003h, 'i',030h, 't',030h, ' ',01fh
left  db '                   '
right db '                         '
inst  db 'Preess the letter if the letter is capital, press shift and the letter           '
Clear endp
finish:
mov ah,4ch ; terminate program
int 21h
end start
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.