Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This is my first year learning about assembly language I really need help workin

ID: 3653339 • Letter: T

Question

This is my first year learning about assembly language

I really need help working on this assembly language program

I really appreciate your help... and I will make sure I rate your work...

I need help writing codes for sort, add_socore and save....


HERE IS THE INSTRUCTION


HERE IS WHAT I HAVE SO FAR...

I found out there are some errors but i dont know what it is...

============================================================

;FILE FORMAT: EXE

include dos.mac


STACK_SEG SEGMENT STACK

DB 100 DUP(?)

STACK_SEG ENDS


EXTRA_SEG SEGMENT EXTRA

DB 100 DUP(?)

EXTRA_SEG ENDS


DATA_SEG SEGMENT 'DATA'

hs db 0DH,0AH,"The high scores are: $"

prmpt db 0DH,0AH, "Do you want to:",0DH,0AH

db "a. Add a new score to the list?",0DH,0AH

db "b. Exit ",0DH,0AH

db '$'


errprmpt db 0DH,0AH, "Choice unacceptable. $"


filename db "score.bin",0


handle dw 0


char db ?

nmin db 6,?,6 DUP(?)

scrin db 9,?,9 DUP(?)


nmprmpt db 0DH,0AH, "Enter Name: $"

scrprmpt db 0DH,0AH, "Enter Score: $"


bye db 0DH,0AH, "Bye $"


scr1 db "16777215: DAVID "

scr2 db "999: BILLY "

scr3 db "998: JEANE "



DATA_SEG ENDS


CODE_SEG SEGMENT PARA 'CODE'

ASSUME CS:CODE_SEG, DS:DATA_SEG, SS:STACK_SEG


MAIN PROC FAR

MOV AX,DATA_SEG

MOV DS,AX

MOV AX,STACK_SEG

MOV SS,AX

MOV AX,EXTRA_SEG

MOV ES,AX


CREATE filename

WRITE handle,scr1

WRITE handle,scr2

WRITE handle,scr3

CLOSE handle


START:

PRINTS hs


OVER:

PRINTS prmpt

INCHAR

MOV CHAR,AL

CMP CHAR,'a'

JE @a

CMP CHAR, 'b'

JE @b

JNE @x


@a:

PRINTS nmprmpt

STRINGIN nmin

PRINTS scrprmpt

STRINGIN scrin

CALL ADDSCORE


JMP START

@b:

PRINTS bye

JMP DONE


@x:

PRINTS errprmpt

JMP OVER


DONE:

.EXIT

MAIN ENDP


ADDSCORE PROC NEAR

OPEN filename

CLOSE handle

RET

ADDSCORE ENDP


CODE_SEG ENDS

END MAIN



=====================================================================

HERE IS MY DOS file

=================================================================

StringIn MACRO in

MOV AH,0AH

MOV DX,OFFSET in

INT 21H

ENDM


PrintC MACRO char

MOV DL,OFFSET char

MOV AH,02

INT 21h

ENDM


PrintS MACRO string

MOV DX, OFFSET string

MOV AH,09

INT 21h

ENDM


Return MACRO

MOV AH,4Ch

INT 21h

ENDM


Create MACRO filename

mov cx, 0

mov ah, 3ch

mov dx, offset filename+2

int 21h

ENDM


Open MACRO filename

mov al, 0

mov ah, 3dh

mov dx, offset filename+2

int 21h

ENDM


Read MACRO handle,buff

mov ah, 3fh

mov bx, handle

xor cx, cx

mov cl, buff[0]

mov dx, offset buff[2]

int 21h

ENDM


Write MACRO handle,buff

mov ah, 40h

mov bx, handle

mov dx, offset buff+2

xor cx, cx

mov cl, buff[1]

int 21h

ENDM


Close MACRO handle

mov bx, handle

mov ah, 3eh

int 21h

ENDM


InChar MACRO

MOV AH,1

INT 21H

ENDM

Explanation / Answer

See "Art of Assembly Language" By Klint Finley chap 2 hope this will help u a lot

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote