PIC Vietnam

Go Back   PIC Vietnam > Mua bán & Trao đổi > Trao đổi ngoài luồng

Tài trợ cho PIC Vietnam
Trang chủ Đăng Kí Hỏi/Ðáp Thành Viên Lịch Bài Trong Ngày Vi điều khiển

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
Prev Previous Post   Next Post Next
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
 


Quyền Sử Dụng Ở Diễn Ðàn
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Mở
Smilies đang Mở
[IMG] đang Mở
HTML đang Tắt

Chuyển đến


Múi giờ GMT. Hiện tại là 12:57 AM.


Được sáng lập bởi Đoàn Hiệp
Powered by vBulletin®
Page copy protected against web site content infringement by Copyscape
Copyright © PIC Vietnam