30.10.2014 Views

o_195h4n6al16jb186b1b2qs7fgssa.pdf

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

uffer points to the storage location of data to be written<br />

count the number of characters to write.<br />

Return Value: If successful, write returns the number of characters actually<br />

written. A<br />

return value of ‘-1’indicates an error.<br />

Remarks: If the actual space remaining on the disk is less than the size of the<br />

buffer the function is trying to write to the disk, write fails and does not<br />

flush any of the buffer's contents to the disk. If the file is opened in text<br />

mode, each linefeed character is replaced with a carriage return –<br />

linefeed pair in the output. The replacement does not affect the return<br />

value.<br />

This is a helper function called by the Standard C Library function<br />

fflush().<br />

Default Behavior: As distributed, the parameters are passed to the host file<br />

system<br />

through the simulator. The return value is the value returned by the host<br />

file system.<br />

File: write.c<br />

dsPIC<br />

®<br />

Language Tools Libraries<br />

một tham số.<br />

Assembler<br />

Điều hành / Máy<br />

Hướng dẫn:<br />

tblpage<br />

__builtin_tbloffset<br />

Mô tả: Chức năng trả về trang bảng bù đắp của các đối tượng có địa chỉ<br />

được đưa ra như một tham số. Đối số pmust là địa chỉ của một<br />

đối tượng trong một dữ liệu EE, PSV hay không gian bộ nhớ thực thi; nếu<br />

không một<br />

thông báo lỗi được sản xuất và biên soạn không. Xem không gian<br />

thuộc tính trong MPLAB®<br />

Hướng dẫn C30 C Compiler của người dùng.<br />

Nguyên mẫu: int __builtin_tbloffset (const void * p);<br />

Đối số: p địa chỉ đối tượng<br />

Quay trở lại giá trị: Trả về số trang bảng offsetof đối tượng có địa chỉ là<br />

được coi là một tham số.<br />

Assembler<br />

Điều hành / Máy<br />

Hướng dẫn:<br />

tbloffset<br />

DS51456B-page 374<br />

NOTES:<br />

dsPIC<br />

2004 Microchip Technology Inc.<br />

__builtin_psvpage<br />

Mô tả: Chức năng trả về số trang PSV của đối tượng có địa chỉ<br />

được đưa ra như một tham số. Đối số pmust là địa chỉ của một<br />

®LANGUAGE TOOLS<br />

LIBRARIES<br />

2004 Microchip Technology Inc. DS51456B-page 375<br />

Chapter 5. MPLAB C30 Built-in Functions<br />

5.1 INTRODUCTION<br />

This chapter describes the MPLAB C30 built-infunctions that are specific to<br />

dsPIC<br />

devices.<br />

Built-in functions give the C programmer access to assembler operators or<br />

machine<br />

instructions that are currently only accessibleusing inline assembly, but are<br />

sufficiently<br />

useful that they are applicable to a broad range of applications. Built-in<br />

functions are<br />

coded in C source files syntactically like function calls, but they are compiled to<br />

assembly code that directly implements the function, and do not involve<br />

function calls<br />

or library routines.<br />

đối tượng trong một dữ liệu EE, PSV hay không gian bộ nhớ thực thi; nếu<br />

không một<br />

thông báo lỗi được sản xuất và biên soạn không. Xem không gian<br />

thuộc tính trong MPLAB®<br />

Hướng dẫn C30 C Compiler của người dùng.<br />

Nguyên mẫu: int __builtin_psvpage (const void * p);<br />

Đối số: p địa chỉ đối tượng<br />

Quay trở lại giá trị: Trả về số trang PSV của đối tượng có địa chỉ được đưa ra<br />

như một<br />

tham số.<br />

Assembler<br />

Điều hành / Máy<br />

Hướng dẫn:<br />

psvpage<br />

MPLAB C30 Built-in chức năng<br />

2004 Microchip Technology Inc DS51456B trang 379<br />

5.3 CHỨC NĂNG THÔNG ĐIỆP LỖI Xây-IN

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!