Professional Documents
Culture Documents
06496502714
EXPERIMENT 5
AIM
Write a program to find ones complement of a given number. Let the number be 55H stored at memory location
2501H and the result is stored at 2502H.
PROGRAM
STEPS
1. RESET
2. DELGO
3. REL EXMEM (2 times)
4. 2501 MEMC NEXT 55
5. 2502 MEMC NEXT 00
6. FILL
7. REPEAT Steps 1-3
8. 2000 MEMC NEXT 21
9. 2001 MEMC NEXT 01
10. 2002 MEMC NEXT 25
11. 2003 MEMC NEXT 7E
12. 2004 MEMC NEXT 2F
13. 2005 MEMC NEXT 23
14. 2006 MEMC NEXT 77
15. 2007 MEMC NEXT 76
16. FILL
17. DELGO 2000 FILL E (will be displayed)
18. REPEAT Steps 1-3
19. 2502 MEMC NEXT AA (Result displayed)
RESULT
2502H AA
START
INITIALIZE HL PAIR
STOP