SHARE
TWEET

Untitled

a guest Dec 3rd, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. text segment 'code'
  2.     assume CS:text, SS:text, DS:text,ES:text
  3.     org 100h
  4.     main proc
  5.     JMP M0
  6. ;текст программы
  7. RESULT DB 2 DUP('$')
  8. STR1    DB '012345678'
  9. M0:
  10.     XOR CH,CH  
  11.     MOV CL,DS:[80h]
  12.     JCXZ SOUND
  13.     MOV CX,8
  14.     MOV SI,82h
  15.     SUB DI,DI
  16.     MOV BL,[SI]
  17.     LEA SI,RESULT
  18. M1:
  19.     MOV AL,BL
  20.     AND AL,00000001b
  21.     CMP AL,0
  22.     JE M3
  23. M2:
  24.     SHR BL,1
  25.     LOOP M1
  26.     MOV AH, STR1[DI]
  27.     MOV [SI], AH
  28.     MOV AH,09h
  29.     LEA DX, RESULT
  30.     INT 21H
  31.     JMP EXIT
  32. M3:
  33.     INC DI
  34.     JMP M2
  35. SOUND:
  36.     cli
  37.     in AL, 61h
  38.     mov CX,2000
  39. begin:push CX
  40.     or AL, 00000010b
  41.     out 61h,AL
  42.     mov CX,1000
  43. cikl:loop cikl
  44.     and AL, 11111101b
  45.     out 61h,AL
  46.     mov CX,1000
  47. cikl1: loop cikl1
  48.     pop CX
  49.     loop begin
  50.     sti
  51. EXIT:  
  52.     mov AX,4C00h;завершение
  53.     INT 21h     ;программы
  54. main endp
  55. ;определения данных
  56. text ends
  57.     end main
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top