|
Tài trợ cho PIC Vietnam |
Trao đổi ngoài luồng Các loại vi điều khiển khác, tản mạn của các anh chàng và cô nàng kỹ thuật ... |
|
Ðiều Chỉnh | Xếp Bài |
05-01-2009, 04:40 PM | #1 |
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 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. |
|
|