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


i have compiled assembly program , i'm asked modify removing last row seen in cmd prompt. i'm new @ assembly can't find solution.

when run 5 rows appear, , i'm trying delete row below;

press [q]uit [e]xecute [c]lear:  ;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 week vmon       db 0 ;month vdm    db 0 ;day of month cdw0       db 'sunday$   '  ;all days 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 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      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 stored in      call    pi2s        ;vi2s_s 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 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 keyboard     int 21h     ;to al     ret         ; putc:     mov ah,2h       ;display character      int 21h     ;at dl     ret         ; puts:        mov ah,9h       ;display string terminated '$'     int 21h     ;at 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 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 guiding questions:

  1. does text you're looking prevent appear in code?
  2. is identified in way?
  3. does identifier exist elsewhere in code?
  4. where usage take you?

there handfull of instructions care about. these questions find them, , understand 1 delete.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -