code mov ax, @data; Initialize data discussion section mov ds, ax mov ax, a; Load number1 in ax neg ax; find 2s compement. Result in ax sub ax, 1; 1s complement=2s comp-1 mov ch, 04h; deem of physiques to be displayed mov cl, 04h; Count to axial motion by 4 bits mov bx, ax; Result 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; get notwithstanding if lsb cmp dl, 09; check i! f digit is 0-9 or earn A-F jbe l4 add dl, 07; if letter add 37H else only add 30H l4:add dl, 30H mov ah, 02; Function 2 under INT 21H (Display character) int 21H declination ch; Decrement Count jnz l2 mov ah, 4cH; Terminate Program int 21H end ((Result : C:\programs>tasm 1scomp.asm Turbo Assembler Version 3.0 Copyright (c) 1988, 1991 Borland International Assembling rouse: 1scomp.asm Error...If you emergency to get a full essay, order it on our website: OrderCustomPaper.com
If you want to get a full essay, visit our page: write my paper
No comments:
Post a Comment