Fifth example
-a100
297D:0100 MOV AH,02 ; Function 2 (writes on the screen)
297D:0102 MOV CX,0008; Puts value 0008 on register CX
297D:0105 MOV DL,00 ; Puts value 00 on register DL
297D:0107 RCL BL,1 ; Rotates the byte in BL to the left by one bit
; through the carry flag
297D:0109 ADC DL,30 ; Converts flag register to1
297D:010C INT 21 ; Calls for DOS
297D:010E LOOP 0105 ; Jumps if CX > 0 to direction 0105
297D:0110 INT 20 ; Ends the program
This program displays on the screen a binary number through a conditional cycle (LOOP) using byte rotation.
Sixth example
-a100
297D:0100 MOV AH,02 ; Function 2 (writes on the screen)
297D:0102 MOV DL,BL ; Puts BL's value on DL
297D:0104 ADD DL,30 ; Adds value 30 to DL
297D:0107 CMP DL,3A ; Compares 3A value with DL's contents without
; affecting its value only modifying the state of
; the car
297D:010A JL 010F ; jumps if < direction 010f
297D:010C ADD DL,07 ; Adds 07 value on DL
297D:010F INT 21 ; Calls for Dos
297D:0111 INT 20 ; Ends the Program
This program prints a zero value on hex digits
Seventh example
-a100
297D:0100 MOV AH,02 ; Function 2 (writes on the screen)
297D:0102 MOV DL,BL ; Puts BL value on DL
297D:0104 AND DL,0F ; Carries ANDing numbers bit by bit
297D:0107 ADD DL,30 ; Adds 30 to Dl
297D:010A CMP DL,3A ; Compares Dl with 3A
297D:010D JL 0112 ; Jumps if < 0112 direction
297D:010F ADD DL, 07 ; Adds 07 to DL
297D:0112 INT 21 ; Calls for Dos
297D:0114 INT 20 ; Ends the program
This program is used to print two digit hex numbers.
Eight example
-a100
297D:0100 MOV AH,02 ; Function 2 (writes on the screen)
297D:0102 MOV DL,BL ; Puts BL value on DL
297D:0104 MOV CL,04 ; Puts 04 value on CL
297D:0106 SHR DL,CL ; Moves per four bits of your number to the
; rightmost nibble
297D:0108 ADD DL,30 ; Adds 30 to DL
297D:010B CMP L,3A ; Compares Dl with 3A
297D:010E JL 0113 ; Jumps if < 0113 direction
297D:0110 ADD DL,07 ; Adds 07 to DL
297D:0113 INT 21 ; Calls for Dos
297D:0115 INT 20 ; Ends the program
This program works for printing the first of two digit hex numbers
Quantum Computing: Revolutionizing the Future with Cutting-Edge
Advancements Introduction to Quantum Computing
-
Quantum Computing: Revolutionizing the Future with Cutting-Edge
Advancements
Introduction to Quantum Computing
Quantum computing is tran...
No comments:
Post a Comment