tasm


I can't figure out how to delete a row in my tasm assembly homework


I have a compiled assembly program and I'm asked to modify it by removing the last row seen in the cmd prompt. I'm new at assembly so I can't find a solution.
Here is the .asm file that given to me:
https://www.dropbox.com/s/vks00v4e941cznv/odev2-2.asm
When you run it 5 rows appear, and I'm trying to delete the row below;
Press [q]uit [e]xecute [c]lear:
Its very urgent I have to do it till tomorrow. Can you help me?
;Serhad Ali Turhan 040060390
.8086
.MODEL small
.STACK 256
.DATA
;~~~~~~ Declarations ~~~~~~~~
CR equ 13d
LF equ 10d
cPrompt DB 'Press [q]uit [e]xecute [c]lear: $'
cName DB 'SERHAD ALI TURHAN',CR,LF,'$'
cNum DB 'Electronical Engineering',CR,LF,'$'
cSch DB 'ITU Ayazaga Kampusu 34469 Maslak-ISTANBUL',CR,LF,'$'
vDW DB 0 ;Day of the Week
vMon DB 0 ;Month
vDM DB 0 ;Day of the month
cDW0 DB 'SUNDAY$ ' ;All days are 10 bytes
cDW1 DB 'MONDAY$ '
cDW2 DB 'TUESDAY$ '
cDW3 DB 'WEDNESDAY$'
cDW4 DB 'THURSDAY$ '
cDW5 DB 'FRIDAY$ '
cDW6 DB 'SATURDAY$ '
vI2S_I DW 0 ;2 bytes
vI2S_S DB ?,?,?,?,'$' ;4 bytes
cExcode DB 0
;~~~~~~~~ Main Program ~~~~~~~~
.CODE
MAIN PROC
mov ax,#data ; Initialize DS to address
mov ds,ax ; of data segment
call pClr
jmp pExecute
jmp pMenu ;
;~~~~~ Menu ~~~~~
pMenu:
lea dx,cPrompt ;
call puts ;
call getc ;AL has user selection
push ax ;Store it
call pNL ;
pop ax ;
cmp al,'q' ;al?=q
je lQuit ;Quit
cmp al,'c' ;al?=c
je lClr ;Clear screen
cmp al,'e' ;
je pExecute ;
jmp pMenu ;
lClr:
call pClr
jmp pMenu ;
lQuit:
call pQuit
;~~~~~~~~
pExecute:
call pInfo
call pClock
call pDate
call pNL
jmp pMenu ;
pInfo:
lea dx,cName ;
call puts ;Display Name
lea dx,cNum
call puts ;Display Department
lea dx,cSch
call puts ;Display School Address
ret
pClock:
mov ah,2ch ;get time
int 21h
push dx
push cx
mov al,ch ;ch->hour
call pDisp
mov dl,':'
call putc
pop ax ;cl->minute
call pDisp
mov dl,':'
call putc
pop ax ;dh->seconds
mov al,ah
call pDisp
call pNL
ret
pDate:
mov ah,2ah ;get date
int 21h
mov vDW,al ;Store day of week
mov vMon,dh ;Store month
mov vDM,dl ;Store day of month
mov vI2S_I,cx ;Year will be stored in
call pI2S ;vI2S_s as ASCII
mov al,vDM ;Print day of month
call pDisp
mov dl,'.'
call putc
mov al,vMon ;Print month
call pDisp
mov dl,'.'
call putc
lea dx,vI2S_S ;Print year
call puts
mov dl,'-'
call putc
call pDW ;Print day of week
ret
pDW:
mov al,vDW
mov bl,10 ;All days are 10 bytes
mul bl
mov ah,0
mov bx,ax
lea dx,cDW0[bx]
call puts
ret
pDisp:
xor ah,0 ;
aam
add ax,3030h ;
push ax
mov dl,ah ;
call putc
pop dx
call putc
ret
;vI2S_I=1000*vI2S_S[0]+100*vI2S_S[1]+10*vI2S_S[2]+vI2S_S[3]
pI2S: ;intToStr
mov cx,1000 ;
mov ax,vI2S_I ;
mov dx,0
div cx ;
add al,'0'
mov vI2S_S,al ;
mov cx,100 ;
mov ax,dx
mov dx,0
div cx
add al,'0'
mov vI2S_s[1],al
mov cx,10 ;
mov ax,dx
mov dx,0
div cx
add al,'0'
mov vI2S_s[2],al
add dl,'0'
mov vI2S_s[3],dl ;
ret
;~~~~~~~~ Screen I/O Functions ~~~~~~~~
getc:
mov ah,1h ;read character from keyboard
int 21h ;to al
ret ;
putc:
mov ah,2h ;display character
int 21h ;at dl
ret ;
puts:
mov ah,9h ;display string terminated by '$'
int 21h ;at the adress dx
ret ;
;~~ Clear screen ~~~~
pClr:
mov ax,03h ;
int 10h ;
ret ;
;~~ New Line ~~~~~~~
pNL:
mov dl,CR ;
call putc ;
mov dl,LF ;
call putc ;
ret
;~~~~~~~~~ Exit ~~~~~~~~~~~~~~~
;return to DOS
pQuit:
mov ah,4Ch ; DOS function: Exit program
mov al,cExcode ; Return exit code value
int 21h ; Call DOS. Terminate program
MAIN ENDP
END MAIN ; End of program / entry point
I'll offer some guiding questions:
Does the text that you're looking to prevent appear in the code?
Is it identified in some way?
Does that identifier exist elsewhere in the code?
Where does that usage take you?
There are only a handfull of instructions that you care about. These questions will help you find them, and hopefully understand which one to delete.

Related Links

How do you code subtraction in TASM
How to do inverse subtraction in TASM?
Display Negative numbers in TASM
getch() in TASM
why do we use 0dh,0ah after msg1 db in this statement :msg1 db 0dh, 0ah, “ENTER A CHOICE $”;
TASM problems with output
TASM Can't locate .asm file Error: **Fatal** Command line: Can't locate file: filename.asm
TASM giving no output after compile
I can't figure out how to delete a row in my tasm assembly homework
How to read and write A FAT in WinXP [duplicate]
Turbo Assembler [closed]
8086 programming using TASM: pc to pc communication

Categories

HOME
algorithm
google-app-engine
linkedin
amp-html
ns-3
mysql-workbench
components
spring-data-redis
access
bitbucket-api
aws-cli
interpolation
x264
opengl-3
computer-science
teechart
sendgrid-api-v3
32bit-64bit
octave
dkim
gson
startup
ipmitool
libc
selenium-ide
shared-libraries
flatpak
searchview
aws-sdk
dreamweaver
android-7.0-nougat
pyramid
sse
delphi-xe5
bourbon
epsilon
direct3d11
pylons
fractions
vex
alm
python-2.6
dst
angularjs-material
android-gridview
sammy.js
html-encode
least-squares
google-knowledge-graph
sql-server-ce
sessionstorage
node-mssql
watchface
lpsolve
avcapturedevice
show-hide
phpdbg
ovf
reportservice2010
carrot2
video-conferencing
tinkerpop
static-cast
wpas
filehandle
boo
otp
java-websocket
gpg-signature
usart
cubism.js
dup
http-status-code-401
cassia
spreadjs
findfirst
realsense
exim4
libvlc
concurrentmodification
toran-proxy
rpart
uncompress
matlab-deployment
umlgraph
adehabitathr
apache-spark-1.3
teaspoon
entry-point
ora-00904
radiant
openargs
high-resolution
gwt-openlayers
hibernate-entitymanager
video-codecs
robotlegs
frameworkelementfactory
qi4j
zope.interface
iboutlet
thttpd
wiimote
virtualpathprovider
convention
tournament
msr
tabpanel
build-environment
wordprocessingml
fail-fast-fail-early
leader

Resources

Encrypt Message