View Single Post
Old 05-01-2009, 04:40 PM   #1
viet_bk
Nhập môn đệ tử
 
Tham gia ngày: Oct 2007
Bài gửi: 5
:
hỏi về biểu diễn số thập phân

Bác nào cho em hỏi cách biểu diễn số thập phân cái

em có một chương trình sau:

Synopsis:
Code:
#include <arith.h>
void fpmul(float fOpr1, float fOpr2, float *fRes);
Assembly: 
push X ; preserve X register if necessary
mov A, >fRes ; push the address of result variable
push A
mov A, <fRes
push A
mov A, [fOpr2+0] ; push the second parameter fOpr2
push A
mov A, [fOpr2+1]
push A
mov A, [fOpr2+2]
push A
mov A, [fOpr2+3]
push A
mov A, [fOpr1+0] ; push the first parameter fOpr1
push A
mov A, [fOpr1+1]
push A
mov A, [fOpr1+2]
push A
mov A, [fOpr1+3]
push A
lcall fpmul ; do the multiplication
add SP, 246 ; pop the stack
pop X ; restore the X register if necessary
trong đó:
fOpr1,fOpr2 là các số thập phân. nó biểu diễn bằng 4byte thì phải. bác nào giả thích cho em cái. thanks

thay đổi nội dung bởi: namqn, 05-01-2009 lúc 05:22 PM.
viet_bk vẫn chưa có mặt trong diễn đàn   Trả Lời Với Trích Dẫn