Assume Cs: codedata segment dB 10 DUP (0) Data endscode segmentstart: mov ax, 13666 mov BX, data mov ds, BX mov Si, 0 call DTOC mov DH, 8 mov DL, 3 mov Cl, 2 call show_str mov ax, 4c00h int 21 h DTOC: Push dx push ds push Si push cx push ax push di mov Di, 0 mov BX, 10 mov Si, 0 pushnumber:; press data into the stack (otherwise the display order is reversed) mov dx, 0; DX must be assigned 0 each time; otherwise, the Division is incorrect Div BX add DL, 030 H push DX mov CX, ax Inc Si jcxz popnumber JMP short pushnumber popnumber: Pop DX mov DS: [di], DL Inc di dec Si mov CX, si jcxz ok1 JMP short popnumber ok1: Pop di pop ax pop CX pop Si pop DS pop dx ret show_str: push ax push BX push CX push DX push Si push di push es mov BL, DL; DX mov ax, 0b800h mov es, ax mov ax, 0 mov Al, DH mov Di, 050 H Mul di add Al, BL add ax, ax mov BX, ax; at this time, the DX value must be 0 mov Di, 0 mov ah, cl s: mov Al, DS: [Si]; assign values to the corresponding display cache, until the string contains 0 mov CX, 0 mov Cl, Al jcxz OK mov ES: [bx + DI], ax Inc Si add Di, 2 JMP short s OK: pop es pop di pop Si pop DX pop CX pop BX pop ax retcode endsend start