WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
 

How do deal with storing values?, I want to store 2 values and multiply them. I'm not sure if delievered them right. I'm using a 16-bit DOS assembly.

eaOn
Quote Post


New Member
*

Group: Members
Posts: 1
Member No.: 13311
Joined: 2-October 08


My code is a bit messy right now, totally confuse, and acting stupid right now . I simply don't know how multiply my 2 inputs. I tried to debug and I see some decrepancy but can't figure it out anyways.

Here's my sourcecode. It's not finish. I still didn't write the shift and rotate operation which is suppose to handle in the 2 stored values and readying for multiplication.
CODE

.model small
.586
.stack 100h
.data
  buf1 db 5 dup (?);It is suppose to store the value in here.
  buf2 db 5 dup (?);But its not working!
;buf3 db 4 dup (?)
  message1 db 0ah,0dh,"Enter your first integer: ",0ah,0dh,"$"
  message2 db 0ah,0dh,"Enter your second integer: ",0ah,0dh,"$"
  message3 db 0ah,0dh,"The answer is: ",0ah,0dh,"$"
.code
main proc
  mov ax,@data
  mov ds,ax

  mov dx,offset message1;prompt for first input
  mov ah,9
  int 21h

  mov buf1,3;limit input to 2 char
  mov dx,offset buf1
  call line

  mov bl,dl

  mov dx,offset message2;prompt for second input
  mov ah,9
  int 21h


  mov buf2,3;limit input to 2 char
  mov dx,offset buf2
  call line

;mov cl,dl

  jmp outsideLine

;mov buf2,2
;mov dx,offset buf2
;call line


line proc near
  mov ah,0ah
  int 21h
  ret
line endp

outsideLine:

  mov dx,offset message3
  mov ah,9
  int 21h

;mov al,buf1
;mov cl,buf2
  mul cl
;int 3
;int 3

  mov ah,1
  int 21h

  mov ax,4c00h
  int 21h



main endp
end main



AH!
I need help!
I'm using masm.

PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google