Inverth

lab1-asm-v1

Sep 18th, 2020 (edited)
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ORG 0h
  2. JMP BEGIN
  3. ORG 30H
  4. BEGIN:
  5.     mov 00h, #60d
  6.     mov 08h, #20d
  7.     mov 10h, #40d
  8.     mov 18h, #50d
  9.  
  10. metka:
  11.     MOV 0C0H,#00111111b ;00111101
  12.     JB 0C0H.3,$
  13.     MOV A, 0C0H
  14.     MOV C, 0C0H.4
  15.     MOV PSW.3, C        ;rs0 mladshiy bit banka
  16.     MOV C, 0C0H.5
  17.     MOV PSW.4, C        ;rs1 2 starshiy bit banka
  18.    
  19.     MOV C, 0C0H.2       ;c = x
  20.     CPL C               ;c = ^x
  21.     ANL C, /0C0H.1      ;C = ^x&^y
  22.     ORL C, /0C0H.0      ;C = (^x&^y)v^z
  23.    
  24.     MOV 0C0H.7,C
  25.     CLR 0C0H.6
  26.     JNB 0C0H.3,$
  27.  
  28.     ANL A, #07H
  29.     RLC A
  30.     MOV @R0, A
  31.     INC R0
  32.  
  33.     CLR 0C0H.6
  34.     JMP METKA
  35. END
Add Comment
Please, Sign In to add comment