Here is I found at emu8086, it is very similar to what I have to do, but first I have to understand the concept
org 100h

; load binary value:
; (hex: 5h)
mov al, 00000101b

; load hex value:
mov bl, 0ah

; load octal value:
; (hex: 8h)
mov cl, 10o

; 5 + 10 = 15 (0fh)
add al, bl

; 15 - 8 = 7
sub al, cl




; print result in binary:
mov bl, al
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


After cx, I'm unclear what is going on with the registers.
1)I know that cx is used as a counter, what does it keep count of?
2)by assigning 2 to ah how does it prints out the function?
3)when int21h is called, which register does it outputs?
Posted on 2007-04-08 14:35:35 by goldy
I thought you could step through the EMUproggy and it shows you the registers.

Anyway.

http://www.btinternet.com/~btketman/

Will explain EVERYTHING to get you started for DOS at novice level.

Its an Interpreter with an interactive tutorial.

The INTs are things you will learn for yourself, once you learn the basics.
There's about a zillion of them...but you only need to know a few to start with.
http://www.ctyme.com/rbrown.htm

mov cl, 10o

is the loop counter, but the syntax looks pretty goofy for me, it might be octal, which would make it an eight.
Posted on 2007-04-08 15:47:07 by eek
You cant just learn it overnight.

I put a bunch of stuff into a small handheld organiser so I could find the command I was after when I started out.

# breakpoint

# fast stepper break

;EW bxax
bxax 32bit window
;EW bxax(1)

;T makes a rep routine backsteppable

ALT-?
z
f fixed table
m mystuff
etc

adc add with carry
ax is bottom register
adc bx,0  ;adds 0 to bx together with the carry flag(+1) if set

add a line
CTRL-SHFT-dwn

and   censors 1,s
ax 1001
bx 0011
and ax,bx
ax 1000

and or xor
can bit flip colours see Tutor86

assemble CTRL-a

auxilliary carry
if ax is zero and we dec ax
to FFFF the acf sets

.......and so on until Z, about 150 entries/explanations.

Its like a giant electronic lego set, and you have to learn the basic rules before you can start to write stuff.

YOU have to learn it first, no-one can learn it for you.
Posted on 2007-04-08 17:23:28 by eek
and if I punch in "loo" and seach in my $10 organiser.

loop
loops with cx
cx is not a flag setting op at 0
cx is decremented
BEFORE the test


With assembly.
You've got to learn to crawl, before you can even walk.

Posted on 2007-04-08 17:46:47 by eek
lol eek did u forgot that you already repely my post already? anyway, thanks for the link to the interpet page. I understand now I to use them.
Posted on 2007-04-08 18:24:19 by goldy