Hi,I'm new to assembly but i cannot figure this out

NEG BYTE [BX] ; Negates byte quantity at DS:BX
NEG WORD [DI] ; Negates word quantity at DS:BX

first line I understand but how did he get BX register in second line?!
thanks in advance

Recommended Answers

All 2 Replies

hi operator,

you are right! I never noticed that before. Could simply be a trick for the CPU-manufacturer to find out, if just a byte or a whole word is to be changed.

Don't take programming-life too seriously. You'll find so many just remarkably funny thinks especially when programming assembly.

Bye
Simon

He probably made a mistake [DI] defaults to DS,
so it should have been DS : DI

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.