answersLogoWhite

0


Best Answer

; count_chars.asm ; counts the number of characters of a zero terminated string. name "counter" org 100h jmp start str1 db 'abcdefg hijklmnop qrstvuwxyz', 0 start: lea bx, str1 ; load address of string. mov ax, 0 ; reset counter. compare: cmp [bx], 0 ; is it end of string? je done ; if zero, then it's the end. inc ax ; count char. inc bx ; next memory position in string. jmp compare ; print result in binary: done: mov bx, ax mov cx, 8 print: mov ah, 2 ; print function. mov dl, '0' test bl, 10000000b ; test first bit. jz zero mov dl, '1' zero: int 21h shl bl, 1 loop print ; print binary suffix: mov dl, 'b' int 21h ; wait for any key press.... mov ah, 0 int 16h ret

; ; count_chars.asm ; counts the number of characters of a zero terminated string. name "counter" org 100h jmp start str1 db 'abcdefg hijklmnop qrstvuwxyz', 0 start: lea bx, str1 ; load address of string. mov ax, 0 ; reset counter. compare: cmp [bx], 0 ; is it end of string? je done ; if zero, then it's the end. inc ax ; count char. inc bx ; next memory position in string. jmp compare ; print result in binary: done: mov bx, ax mov cx, 8 print: mov ah, 2 ; print function. mov dl, '0' test bl, 10000000b ; test first bit. jz zero mov dl, '1' zero: int 21h shl bl, 1 loop print ; print binary suffix: mov dl, 'b' int 21h ; wait for any key press.... mov ah, 0 int 16h ret

;

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Show you with detailed of assembly codes of emu8086 assemblers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Why are assemblers used?

to translate mnemonic operation codes to their machine language equivalents and assigning machine address to symbolic labels used by the programmer.


What are the advantages using c?

control, control, control. the original c code had a 1 to 1 mapping between commands and assembly codes, so a programmer could in theory do anything that was possable in assembly in c.


What are the drawbacks of assembly level language?

The assembly language does not support object oriented program so they change to c and c++ the c++ will support object oriented program this are the demerits of assembly language.


Is Assembly-language programs are written using binary codes?

Assembly language allows the developer to have almost total control over what the sequence of instructions will be when a program executes. A compiler tries to translate a high level language such as C++ into a series of instructions, but a good assembly language programmer may be able to optimize the sequence when a compiler cannot. Primarily assembly language is used for speed and optimal machine code.


Why assembly language is still needed if you have hll offering sophisicated tools?

Yes, assembly language is definitely still used. Many I/O drivers and much of the bootstrap code that starts a computer must be written in assembly language as high level languages do not provide means for coding certain special purpose instructions needed for these operations. Also high level languages usually require that subroutine library codes be available, while assembly language does not. As these subroutine library codes usually cannot be loaded until the Operating System is up and running, assembly language must be used for much of the code that bootstraps the computer and loads the Operating System.

Related questions

Why are assemblers used?

to translate mnemonic operation codes to their machine language equivalents and assigning machine address to symbolic labels used by the programmer.


The acceptable treatment of slaves was detailed in the slave codes.?

Whipping, beating,molesting etc.


What do the numbers mean on hazardous placards?

For detailed descriptions of the codes used follow the related link.


What is Pakistan zip code?

Different cities have different codes and countries don't have zip codes. Detailed list of Zip Codes of all cities of Pakistan can be found on Wikipedia.


What does the order of the bases in DNA ultimately?

Order of bases in a gene codes for the amino acid assembly into a protein.


Will disconnecting battery clear abs codes on 99 Chevy blazer?

you probably need to repalce one of the front wheel bearings(hub assembly). the sensor for the abs is located in the assembly


How do you get codes off of 1999-2003 windstar?

The "Related Questions" below cover the Check Engine Light and retrieving the diagnostic trouble codes (DTC).Lots of detailed information and guidance...


What is the zip code for London Heathrow?

The UK doesn't use ZIP codes, it uses post codes which are much more detailed, so each of the five terminals at Heathrow will have its own post code.


What is the cpt code for hysteroscopy?

You can use code range 58555-58565 depending on what services are performed. Supercoder.com has detailed info of these codes.


What are the advantages using c?

control, control, control. the original c code had a 1 to 1 mapping between commands and assembly codes, so a programmer could in theory do anything that was possable in assembly in c.


Zip code of Rochester Kent England?

We have post codes on Englad instead of zip codes. These are much more detailed and Rochester must have hundreds of them. You need to know the street and the number. See the Related Link.


Where can you get unlimited rare candies?

try AR codes sorry if this isn;t detailed enough but i personally dont have an action replay myself:P