NEW STARTER

[b][red]This message was edited by liver at 2003-3-1 5:43:35[/red][/b][hr]
dear assemblers I am an electronic student learning about the 8086 assembly language.I have been set a problem:using the 8086 assembly level instruction set mnemononics, write a fully commented ASM86 routine to
> multiply two 64 bit unsigned numbers to produce a 128 bit result.Assume
> the BX register points to the starting address of the block of memory
> which holds the two 64 bit numbers and which is required to store the
> 128 bit result.I have been trying to carry out the programme on an
> emulator without any success.Could you possibly post me a worked
> solution or advise of an emulator that I could use? I require the shortest instructions using the MULT opcode and a short example for two hex numbers only.



Comments

  • : dear assemblers I am an electronic student learning about the 8086 assembly language.I have been set a problem:using the 8086 assembly level instruction set mnemononics, write a fully commented ASM86 routine to
    : > multiply two 64 bit unsigned numbers to produce a 128 bit result.Assume
    : > the BX register points to the starting address of the block of memory
    : > which holds the two 64 bit numbers and which is required to store the
    : > 128 bit result.I have been trying to carry out the programme on an
    : > emulator without any success.Could you possibly post me a worked
    : > solution or advise of an emulator that I could use? regards L.
    :
    :
    Ok below is code i made for the Reverse Polish calculator in X86. i must warn u too look at it in detail!!! it uses
    the BCD system and the "Floating Point Unit" and its functions like fmul and fdiv not the standard mul, div
    this is how it works
    compile it and run the exe
    if u enter
    "100 100 +"afetr the plus press enter
    you will get
    "200"
    thats how its work basicaly, u can also do
    "100 200 300 1 34 +" then enter and this will add all the numbers u entered
    [code]
    ; --------------------------------------------------------------------------
    PAGE 60,132
    DOSSEG
    .MODEL SMALL ; All data fits in 64K segment, all code in 64K seg

    ; ----stack segment----
    .STACK 100h ; Reserves 256 stack entries

    ; ---- Enter structures here----

    ; ----data segment----
    .DATA
    maxbin = 4
    out_str db maxbin dup('0'), " $"
    alpha_str db 'Reverse Polish Calculator by Leon:', 13, 10, '$'
    cls_line db 13,10,'$'
    in_str db '111111111111111111',13,10,'$'
    bcd_index dw 0h
    in_index dw 0h
    bcd_var1 dt 0h
    bcd_out2 dt 0h
    out_index dw 0h
    bcd_out_str db '000000000000000000',13,10,'$'
    status_word dw 0AAAAh
    ; ----Macros----
    mymacro MACRO arg1, arg2 ;arg1 and arg2 and two parameters passed to macro

    ENDM ; Marks the end of a Macro

    ; ----code segment----
    .CODE ; Marks the start of the program instructions

    MAIN: MOV AX, @DATA ; Load segment register into DS register
    MOV DS, AX
    MOV ES, AX

    ;----- ENTER CODE HERE ------

    call cls ;CLS
    mov dx, offset alpha_str
    mov ah, 09h
    int 21h
    finit

    get_in_again:
    call get_input
    cmp ah, 0dh ;on enter do entire equation
    jz do_equation
    cmp ah, 020h ;on space push number on fpu stack
    jz push_to_fpu
    cmp ah, 0h
    jnz do_push
    push_to_fpu:
    mov bx, offset bcd_var1
    fbld [bx]
    jmp get_in_again
    do_push:
    push ax
    jmp get_in_again
    do_equation:
    mov bx, 01h ;CLS
    call cls ;CLS
    pop ax
    cmp ah, 02bh;+
    jz do_add
    cmp ah, 02dh;-
    jz do_sub
    cmp ah, 02ah;*
    jz do_mul
    cmp ah, 02fh;/
    jz do_div
    cmp ah, 053h;sqrt
    jz do_sqrtrt
    cmp ah, 054h;T
    jz disp_bcd
    cmp ah, 049h ;I
    jz do_il
    cmp ah, 05ah ;Z
    jz do_zl
    cmp al, 05eh;^
    jz do_sqr
    cmp ah, 051h;Q
    jz exit_h
    cmp al, 050h ;P
    jz do_drop
    cmp al, 056h ;V
    jz do_view
    jmp get_in_again
    exit_h:
    jmp exit
    do_add:
    fadd
    jmp disp_bcd
    do_sub:
    fsub
    jmp disp_bcd
    do_mul:
    fmul
    jmp disp_bcd
    do_div:
    fdiv
    jmp disp_bcd
    do_sqrtrt:
    fsqrt
    jmp disp_bcd
    do_il:
    fld1
    jmp disp_bcd
    do_zl:
    fldz
    jmp disp_bcd
    do_sqr:
    mov bx, offset bcd_var1
    fbld [bx]
    fmul
    jmp disp_bcd
    do_drop:
    mov bx, offset bcd_out2
    fbstp [bx]
    jmp d_bcd_a
    disp_bcd:
    mov bx, offset bcd_out2
    fbstp [bx]
    fbld [bx]
    d_bcd_a:
    call bcd_to_str
    mov dx, offset bcd_out_str
    mov ah, 09h
    int 21h
    dv_a_h:
    jmp do_equation
    do_view:
    ftst
    fstsw status_word
    mov ax, status_word
    mov cl, 14
    shr ax, cl
    cmp al, 01h
    jz dv_a_h ;do_equation
    do_view_a:
    mov bx, offset bcd_out2
    fbstp [bx]
    call bcd_to_str
    mov dx, offset bcd_out_str
    mov ah, 09h
    int 21h
    jmp do_view

    ;----- END CODE HERE --------
    exit:
    MOV AH, 4Ch ; Load DOS Exit function
    INT 21h ; Call DOS

    ;----- Procedures go here -----
    ;Clears screen with 30 empty lines if bx=0
    ;if bx >0 clears the screen bx times
    cls proc near
    push ax
    push bx
    push dx
    push cx

    mov dx, offset cls_line
    mov ah, 9
    cmp bx, 0h
    jz dontusebx
    jmp usebx
    usebx:
    mov cx, bx
    jmp cls_notdone
    dontusebx:
    mov cx, 01eh
    cls_notdone:
    int 21h
    dec cx
    jcxz cls_done
    jmp cls_notdone
    cls_done:
    pop cx
    pop dx
    pop bx
    pop ax
    ret
    cls endp

    get_char proc near
    push bx ;INSURANCE
    push cx ;INSURANCE
    push dx ;INSURANCE

    mov ah, 00
    int 16h
    push ax
    mov ah, 14
    mov bl, 7
    int 10h
    pop ax
    mov ah, 0 ;CLEARS HIGH PART OF AX ADDED BY ME DELET LATER ON!

    pop dx ;INSURANCE
    pop cx ;INSURANCE
    pop bx ;INSURANCE

    ret
    get_char endp

    get_input proc near
    push bx
    push dx
    mov bx, offset in_str
    call clean_in_str
    mov bx, offset in_str
    mov cx, 0h
    get_in_a:
    call get_char
    call check_for_operator ;checks for operators
    cmp ah, 0h
    jnz get_in_f ;if ah is NOT 0 quit

    mov [bx], al
    inc bx
    inc cx
    cmp cx, 012h;compare to 18
    jz get_in_f
    jmp get_in_a

    get_in_f:
    ;mov bx, 01h ;CLS
    ;call cls ;CLS
    call str_to_bcd

    pop dx
    pop bx
    ret
    get_input endp

    ;bx=string location
    clean_in_str proc near
    push bx
    push cx
    push ax
    mov ax, 0h
    mov cx, 012h
    clean_a:
    mov [bx], al
    inc bx
    dec cx
    jcxz clean_f
    jmp clean_a
    clean_f:
    pop ax
    pop cx
    pop bx
    ret
    clean_in_str endp

    ;bx=offset of bcd_var1
    clean_bcd_var proc near
    push ax
    push dx
    push cx
    mov ax, 0h
    mov cx, 0ah
    clean_bcd_a:
    jcxz clean_bcd_f
    mov [bx], al
    inc bx
    dec cx
    jmp clean_bcd_a
    clean_bcd_f:
    pop cx
    pop dx
    pop ax
    ret
    clean_bcd_var endp

    str_to_bcd proc near
    jcxz str_to_bcd_ff; if nothing is to be converted
    push ax
    push bx
    push cx
    push dx
    mov bx, offset bcd_var1
    call clean_bcd_var
    mov bx, offset bcd_var1;+9
    mov dx, bx
    mov bx, offset bcd_index
    mov [bx], dx
    mov bx, offset in_str
    call locate_ascii
    mov si, 0h
    str_to_bcd_a:
    mov al, [bx]
    mov ah, 0h
    sub al, 030h
    dec bx
    mov dx, bx
    mov bx, offset in_index
    mov [bx], dx

    mov bx, offset bcd_index
    mov bx, [bx]
    cmp si, 0h
    jz no_shift
    jmp do_shift
    do_shift:
    shl ax, 1
    shl ax, 1
    shl ax, 1
    shl ax, 1
    mov dx, ax
    mov ax, [bx]
    add ax, dx

    no_shift:
    mov [bx], al
    cmp si,0h ;Personal Flag for decrementing bx
    jz dont_dec
    inc bx
    ;dec bx
    dec si
    jmp si_cont
    dont_dec:
    inc si
    si_cont:
    mov dx, bx
    mov bx, offset bcd_index
    mov [bx], dx
    dec cx
    jcxz str_to_bcd_f
    mov bx, offset in_index
    mov bx, [bx]
    jmp str_to_bcd_a

    str_to_bcd_f:
    pop dx
    pop cx
    pop bx
    pop ax
    str_to_bcd_ff:
    ret
    str_to_bcd endp

    bcd_to_str proc near
    push ax
    push bx
    push cx
    push dx

    mov bx, offset in_str
    call clean_in_str

    mov bx, offset bcd_out_str+17
    mov dx, bx
    mov bx, offset out_index
    mov [bx], dx
    mov bx, offset bcd_out2
    mov dx, bx
    mov bx, offset bcd_index
    mov [bx], dx
    mov bx, dx
    mov di, 0h; digit counter
    repeat_bcd_2_ascii:
    cmp di, 0ah
    jz terminate
    mov ah, 0h
    mov al, [bx]
    mov dx, ax;copy used for next digit

    mov cx, 0ch
    do_l:
    shl ax, 1
    dec cx
    jcxz do_r
    jmp do_l
    do_r:
    mov cx, 0ch
    do_r_a:
    shr ax, 1
    dec cx
    jcxz do_f
    jmp do_r_a
    do_f:
    add al, 030h
    mov bx, offset out_index
    mov bx, [bx]
    mov [bx], al
    dec bx
    mov cx, bx
    mov bx, offset out_index
    mov [bx], cx
    ;NOW DO SECOND DIGIT OF TENBYTE
    mov ax, dx
    mov cx, 04h
    do_r_2:
    shr ax, 1
    dec cx
    jcxz do_f2
    jmp do_r_2
    do_f2:
    add al, 030h
    mov bx, offset out_index
    mov bx, [bx]
    mov [bx], al
    dec bx
    mov cx, bx
    mov bx, offset out_index
    mov [bx], cx

    mov bx, offset bcd_index
    mov bx, [bx]
    inc bx
    mov cx, bx
    mov bx, offset bcd_index
    mov [bx], cx
    mov bx, cx
    inc di
    jmp repeat_bcd_2_ascii
    terminate:
    pop dx
    pop cx
    pop bx
    pop ax
    ret
    bcd_to_str endp


    locate_ascii proc near
    mov cx, 01h
    la_a:
    mov al, [bx]
    cmp al, 0h
    jz la_f
    inc bx
    inc cx
    jmp la_a
    la_f:
    dec cx
    dec bx
    ret
    locate_ascii endp

    check_for_operator proc near
    cmp al, 02bh ;+
    jz do_ah_move
    cmp al, 02dh ;-
    jz do_ah_move
    cmp al, 02ah ;*
    jz do_ah_move
    cmp al, 02fh ;/
    jz do_ah_move
    cmp al, 053h ;S sqr-root
    jz do_ah_move
    cmp al, 0dh ;ON ENTER STOP INPUT
    jz do_ah_move
    cmp al, 020h ;on space
    jz do_ah_move
    cmp al, 054h ;T
    jz do_ah_move
    cmp al, 051h ;Q
    jz do_ah_move
    cmp al, 049h ;I
    jz do_ah_move
    cmp al, 05ah ;Z
    jz do_ah_move
    cmp al, 05eh ;^
    jz do_ah_move
    cmp al, 050h ;P
    jz do_ah_move
    cmp al, 056h ;V
    jz do_ah_move
    jmp ah_0
    do_ah_move:
    mov ah, al
    ah_0:
    ret
    check_for_operator endp
    ;end of procedures
    ALIGN 16
    END MAIN
    [/code]
    A NOTE, USING THIS CODE COMPLETELY WITHOUT MY PERSMISION IS CALLED PLAGIORISM SO BE CAREFULL!
    Hope this helps


    Leon Yuhanov
    GSCo. & MSP
    Melbourne, Australia
    Visit me @ http://home.iprimus.com.au/yuhanov/gsc/gschome01.html
    Email me @ yuhanov@iprimus.com.au

  • : dear assemblers I am an electronic student learning about the 8086 assembly language.I have been set a problem:using the 8086 assembly level instruction set mnemononics, write a fully commented ASM86 routine to
    : > multiply two 64 bit unsigned numbers to produce a 128 bit result.Assume
    : > the BX register points to the starting address of the block of memory
    : > which holds the two 64 bit numbers and which is required to store the
    : > 128 bit result.I have been trying to carry out the programme on an
    : > emulator without any success.Could you possibly post me a worked
    : > solution or advise of an emulator that I could use? regards L.
    :
    :
    Ok below is code i made for the Reverse Polish calculator in X86. i must warn u too look at it in detail!!! it uses
    the BCD system and the "Floating Point Unit" and its functions like fmul and fdiv not the standard mul, div
    this is how it works
    compile it and run the exe
    if u enter
    "100 100 +"afetr the plus press enter
    you will get
    "200"
    thats how its work basicaly, u can also do
    "100 200 300 1 34 +" then enter and this will add all the numbers u entered
    [code]
    ; --------------------------------------------------------------------------
    PAGE 60,132
    DOSSEG
    .MODEL SMALL ; All data fits in 64K segment, all code in 64K seg

    ; ----stack segment----
    .STACK 100h ; Reserves 256 stack entries

    ; ---- Enter structures here----

    ; ----data segment----
    .DATA
    maxbin = 4
    out_str db maxbin dup('0'), " $"
    alpha_str db 'Reverse Polish Calculator by Leon:', 13, 10, '$'
    cls_line db 13,10,'$'
    in_str db '111111111111111111',13,10,'$'
    bcd_index dw 0h
    in_index dw 0h
    bcd_var1 dt 0h
    bcd_out2 dt 0h
    out_index dw 0h
    bcd_out_str db '000000000000000000',13,10,'$'
    status_word dw 0AAAAh
    ; ----Macros----
    mymacro MACRO arg1, arg2 ;arg1 and arg2 and two parameters passed to macro

    ENDM ; Marks the end of a Macro

    ; ----code segment----
    .CODE ; Marks the start of the program instructions

    MAIN: MOV AX, @DATA ; Load segment register into DS register
    MOV DS, AX
    MOV ES, AX

    ;----- ENTER CODE HERE ------

    call cls ;CLS
    mov dx, offset alpha_str
    mov ah, 09h
    int 21h
    finit

    get_in_again:
    call get_input
    cmp ah, 0dh ;on enter do entire equation
    jz do_equation
    cmp ah, 020h ;on space push number on fpu stack
    jz push_to_fpu
    cmp ah, 0h
    jnz do_push
    push_to_fpu:
    mov bx, offset bcd_var1
    fbld [bx]
    jmp get_in_again
    do_push:
    push ax
    jmp get_in_again
    do_equation:
    mov bx, 01h ;CLS
    call cls ;CLS
    pop ax
    cmp ah, 02bh;+
    jz do_add
    cmp ah, 02dh;-
    jz do_sub
    cmp ah, 02ah;*
    jz do_mul
    cmp ah, 02fh;/
    jz do_div
    cmp ah, 053h;sqrt
    jz do_sqrtrt
    cmp ah, 054h;T
    jz disp_bcd
    cmp ah, 049h ;I
    jz do_il
    cmp ah, 05ah ;Z
    jz do_zl
    cmp al, 05eh;^
    jz do_sqr
    cmp ah, 051h;Q
    jz exit_h
    cmp al, 050h ;P
    jz do_drop
    cmp al, 056h ;V
    jz do_view
    jmp get_in_again
    exit_h:
    jmp exit
    do_add:
    fadd
    jmp disp_bcd
    do_sub:
    fsub
    jmp disp_bcd
    do_mul:
    fmul
    jmp disp_bcd
    do_div:
    fdiv
    jmp disp_bcd
    do_sqrtrt:
    fsqrt
    jmp disp_bcd
    do_il:
    fld1
    jmp disp_bcd
    do_zl:
    fldz
    jmp disp_bcd
    do_sqr:
    mov bx, offset bcd_var1
    fbld [bx]
    fmul
    jmp disp_bcd
    do_drop:
    mov bx, offset bcd_out2
    fbstp [bx]
    jmp d_bcd_a
    disp_bcd:
    mov bx, offset bcd_out2
    fbstp [bx]
    fbld [bx]
    d_bcd_a:
    call bcd_to_str
    mov dx, offset bcd_out_str
    mov ah, 09h
    int 21h
    dv_a_h:
    jmp do_equation
    do_view:
    ftst
    fstsw status_word
    mov ax, status_word
    mov cl, 14
    shr ax, cl
    cmp al, 01h
    jz dv_a_h ;do_equation
    do_view_a:
    mov bx, offset bcd_out2
    fbstp [bx]
    call bcd_to_str
    mov dx, offset bcd_out_str
    mov ah, 09h
    int 21h
    jmp do_view

    ;----- END CODE HERE --------
    exit:
    MOV AH, 4Ch ; Load DOS Exit function
    INT 21h ; Call DOS

    ;----- Procedures go here -----
    ;Clears screen with 30 empty lines if bx=0
    ;if bx >0 clears the screen bx times
    cls proc near
    push ax
    push bx
    push dx
    push cx

    mov dx, offset cls_line
    mov ah, 9
    cmp bx, 0h
    jz dontusebx
    jmp usebx
    usebx:
    mov cx, bx
    jmp cls_notdone
    dontusebx:
    mov cx, 01eh
    cls_notdone:
    int 21h
    dec cx
    jcxz cls_done
    jmp cls_notdone
    cls_done:
    pop cx
    pop dx
    pop bx
    pop ax
    ret
    cls endp

    get_char proc near
    push bx ;INSURANCE
    push cx ;INSURANCE
    push dx ;INSURANCE

    mov ah, 00
    int 16h
    push ax
    mov ah, 14
    mov bl, 7
    int 10h
    pop ax
    mov ah, 0 ;CLEARS HIGH PART OF AX ADDED BY ME DELET LATER ON!

    pop dx ;INSURANCE
    pop cx ;INSURANCE
    pop bx ;INSURANCE

    ret
    get_char endp

    get_input proc near
    push bx
    push dx
    mov bx, offset in_str
    call clean_in_str
    mov bx, offset in_str
    mov cx, 0h
    get_in_a:
    call get_char
    call check_for_operator ;checks for operators
    cmp ah, 0h
    jnz get_in_f ;if ah is NOT 0 quit

    mov [bx], al
    inc bx
    inc cx
    cmp cx, 012h;compare to 18
    jz get_in_f
    jmp get_in_a

    get_in_f:
    ;mov bx, 01h ;CLS
    ;call cls ;CLS
    call str_to_bcd

    pop dx
    pop bx
    ret
    get_input endp

    ;bx=string location
    clean_in_str proc near
    push bx
    push cx
    push ax
    mov ax, 0h
    mov cx, 012h
    clean_a:
    mov [bx], al
    inc bx
    dec cx
    jcxz clean_f
    jmp clean_a
    clean_f:
    pop ax
    pop cx
    pop bx
    ret
    clean_in_str endp

    ;bx=offset of bcd_var1
    clean_bcd_var proc near
    push ax
    push dx
    push cx
    mov ax, 0h
    mov cx, 0ah
    clean_bcd_a:
    jcxz clean_bcd_f
    mov [bx], al
    inc bx
    dec cx
    jmp clean_bcd_a
    clean_bcd_f:
    pop cx
    pop dx
    pop ax
    ret
    clean_bcd_var endp

    str_to_bcd proc near
    jcxz str_to_bcd_ff; if nothing is to be converted
    push ax
    push bx
    push cx
    push dx
    mov bx, offset bcd_var1
    call clean_bcd_var
    mov bx, offset bcd_var1;+9
    mov dx, bx
    mov bx, offset bcd_index
    mov [bx], dx
    mov bx, offset in_str
    call locate_ascii
    mov si, 0h
    str_to_bcd_a:
    mov al, [bx]
    mov ah, 0h
    sub al, 030h
    dec bx
    mov dx, bx
    mov bx, offset in_index
    mov [bx], dx

    mov bx, offset bcd_index
    mov bx, [bx]
    cmp si, 0h
    jz no_shift
    jmp do_shift
    do_shift:
    shl ax, 1
    shl ax, 1
    shl ax, 1
    shl ax, 1
    mov dx, ax
    mov ax, [bx]
    add ax, dx

    no_shift:
    mov [bx], al
    cmp si,0h ;Personal Flag for decrementing bx
    jz dont_dec
    inc bx
    ;dec bx
    dec si
    jmp si_cont
    dont_dec:
    inc si
    si_cont:
    mov dx, bx
    mov bx, offset bcd_index
    mov [bx], dx
    dec cx
    jcxz str_to_bcd_f
    mov bx, offset in_index
    mov bx, [bx]
    jmp str_to_bcd_a

    str_to_bcd_f:
    pop dx
    pop cx
    pop bx
    pop ax
    str_to_bcd_ff:
    ret
    str_to_bcd endp

    bcd_to_str proc near
    push ax
    push bx
    push cx
    push dx

    mov bx, offset in_str
    call clean_in_str

    mov bx, offset bcd_out_str+17
    mov dx, bx
    mov bx, offset out_index
    mov [bx], dx
    mov bx, offset bcd_out2
    mov dx, bx
    mov bx, offset bcd_index
    mov [bx], dx
    mov bx, dx
    mov di, 0h; digit counter
    repeat_bcd_2_ascii:
    cmp di, 0ah
    jz terminate
    mov ah, 0h
    mov al, [bx]
    mov dx, ax;copy used for next digit

    mov cx, 0ch
    do_l:
    shl ax, 1
    dec cx
    jcxz do_r
    jmp do_l
    do_r:
    mov cx, 0ch
    do_r_a:
    shr ax, 1
    dec cx
    jcxz do_f
    jmp do_r_a
    do_f:
    add al, 030h
    mov bx, offset out_index
    mov bx, [bx]
    mov [bx], al
    dec bx
    mov cx, bx
    mov bx, offset out_index
    mov [bx], cx
    ;NOW DO SECOND DIGIT OF TENBYTE
    mov ax, dx
    mov cx, 04h
    do_r_2:
    shr ax, 1
    dec cx
    jcxz do_f2
    jmp do_r_2
    do_f2:
    add al, 030h
    mov bx, offset out_index
    mov bx, [bx]
    mov [bx], al
    dec bx
    mov cx, bx
    mov bx, offset out_index
    mov [bx], cx

    mov bx, offset bcd_index
    mov bx, [bx]
    inc bx
    mov cx, bx
    mov bx, offset bcd_index
    mov [bx], cx
    mov bx, cx
    inc di
    jmp repeat_bcd_2_ascii
    terminate:
    pop dx
    pop cx
    pop bx
    pop ax
    ret
    bcd_to_str endp


    locate_ascii proc near
    mov cx, 01h
    la_a:
    mov al, [bx]
    cmp al, 0h
    jz la_f
    inc bx
    inc cx
    jmp la_a
    la_f:
    dec cx
    dec bx
    ret
    locate_ascii endp

    check_for_operator proc near
    cmp al, 02bh ;+
    jz do_ah_move
    cmp al, 02dh ;-
    jz do_ah_move
    cmp al, 02ah ;*
    jz do_ah_move
    cmp al, 02fh ;/
    jz do_ah_move
    cmp al, 053h ;S sqr-root
    jz do_ah_move
    cmp al, 0dh ;ON ENTER STOP INPUT
    jz do_ah_move
    cmp al, 020h ;on space
    jz do_ah_move
    cmp al, 054h ;T
    jz do_ah_move
    cmp al, 051h ;Q
    jz do_ah_move
    cmp al, 049h ;I
    jz do_ah_move
    cmp al, 05ah ;Z
    jz do_ah_move
    cmp al, 05eh ;^
    jz do_ah_move
    cmp al, 050h ;P
    jz do_ah_move
    cmp al, 056h ;V
    jz do_ah_move
    jmp ah_0
    do_ah_move:
    mov ah, al
    ah_0:
    ret
    check_for_operator endp
    ;end of procedures
    ALIGN 16
    END MAIN
    [/code]
    A NOTE, USING THIS CODE COMPLETELY WITHOUT MY PERSMISION IS CALLED PLAGIORISM SO BE CAREFULL!
    Hope this helps


    Leon Yuhanov
    GSCo. & MSP
    Melbourne, Australia
    Visit me @ http://home.iprimus.com.au/yuhanov/gsc/gschome01.html
    Email me @ yuhanov@iprimus.com.au

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion