•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 397,758 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,445 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Assembly advertiser:
This is somewhat a simple project I wrote by getting help from google groups I always recommend.
assemble this code using this command:
assemble this code using this command:
•
•
•
•
nasm -o 1.com 1.asm
ORG 100h MOV si,sp ; Save stack pointer! input_loop: XOR ax,ax INT 16h ; Use int16 to get a keystroke CMP al,' ' ; is it a space char? JE input_loop ; if space, get another char PUSH ax ; Save current char on stack top! CMP al,13 ; Terminating CR? JNE input_loop POP ax ; Get rid of last pushed char (terminating CR) JMP test_stack disp_loop: POP dx ; DL will get the pushed char MOV ah,2 INT 21h test_stack: CMP si,sp ; Is the stack back where we started? JNE disp_loop done: ; So,exit MOV ax,0x4C00 INT 0x21
Post Comment
•
•
•
•
DaniWeb Marketplace (Sponsored Links)