Advertisement
voik3

Untitled

Jun 12th, 2019
932
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PRGSEG          SEGMENT CODE
  2.  
  3.         PUBLIC potencjometr
  4.        
  5.            
  6.         RSEG    PRGSEG
  7.            
  8.            
  9.         PTAC  equ  8000H
  10.         POT0  equ  8005H   
  11.            
  12.            
  13.             petl:
  14.            
  15.            
  16.            
  17.             potencjometr:
  18.         MOV  R7,#0
  19.         mov  DPTR,#POT0
  20.         movx @DPTR,A
  21.         lcall _opz_
  22.         mov  DPTR,#PTAC
  23.         movx A,@DPTR
  24.         MOV  R7,A
  25.        
  26.         ret
  27.        
  28.  
  29.            
  30.             _opz_:
  31.            
  32.             MOV DPTR, #-5500
  33.            
  34.             opz:
  35.            
  36.             INC DPTR
  37.             MOV A, DPH
  38.             ORL A, DPL
  39.             JNZ opz
  40.             RET
  41.                    
  42.        
  43.            
  44.            
  45. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement