code mov ax, @data; Initialize data section mov ds, ax mov ax, a; Load number1 in ax neg ax; find 2s compement. sequel in ax sub ax, 1; 1s complement=2s comp-1 mov ch, 04h; deem of chassiss to be displayed mov cl, 04h; Count to squiggle by 4 bits mov bx, ax; burden in reg bx l2:rol bx, cl; roll bl so that mutual savings bank comes to lsb mov dl, bl; load dl with data to be displayed and dl, 0fH; depart all if lsb cmp dl, 09; check if digit is 0-9 or earn A-F jbe l4 take dl, 07; if letter add 37H else only add 30H l4:add dl, 30H mov ah, 02; utilisation 2 under INT 21H (Display character) int 21H fall ch; Decrement Count jnz l2 mov ah, 4cH; Terminate Program int 21H end ((Result : C:programs>tasm 1scomp.asm Turbo Assembler Version 3.0 secure (c) 1988, 1991 Borland International Assembling file: 1scomp.asm Error...If you fatality to get a affluent essay, order it on our website: Ordercustompaper.com
If you want to get a full essay, wisit our page: write my paper
No comments:
Post a Comment