News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

need help

Started by aotearoa, January 03, 2005, 04:23:02 AM

Previous topic - Next topic

aotearoa

hi all

someone pls help me. anybody know what is nop using for ? n what's mean of nop here?. ummm i've little dificult to modification code for simple code using debug.com. here is the code there nop in it:

-a100
1384:0100 mov ah,02
1384:0102 mov cx,000a
1384:0105 mov dl,41
1384:0107 mov bx,cx
1384:0109 int 21
1384:010B dec bx
1384:010C inc dl
1384:010E mov cx,0003
1384:0111 int 21
1384:0113 loop 111
1384:0115 mov cx,bx
1384:0117 nop
1384:0118 mov bl,dl
1384:011A mov dl,2d
1384:011C int 21
1384:011E mov dl,bl
1384:0120 inc dl
1384:0122 loop 107
1384:0124 int 20
1384:0126
-g
ABBB-CDDD-EFFF-GHHH-IJJJ-
Program terminated normally

i want the output like : A-BBB-C-DDD-E-FFF-G-HHH-I-JJJ-
i've try add DL register with 15H, so after "-" printed there will appear "B" char. but it couldn't solve the problem. pls share some assembler code. so the modification completed.

hutch--

The "NOP" opcode lioterally means No Operation. It is usually used for padding for alignment and in old dos code, was used to act as a delay. I am moving this topic to the 16 bit forum so you will get more answers.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

wizzra

the real instruction is xchg eax,eax
just for the record :P  :clap:

BigDaddy

I work mostly on mainframes (hence my many beginner questions) and on some big systems you can apply a patch to the code in spaces that were filled with NOP's by the original programmer.  See, a common problem on these big boxes is lost or unavailable source code.  If the first programmer didn't purposely code such space, it isn't so easy.  PC programs can probably be made to work the same way, but I don't know if anyone does it.