C++ Reference Card
Hikvision HikDashcam C 8 用户手册说明书

HikDashcam ·C 8User Manual1245©2022Hangzhou HikAuto Technology Co.,Ltd.All rights reserved.AboutThisManualThe Manual includes instructions for using and managing the Product.Pictures,charts,images and all other informationhereinaγer are for description and explanation only.The information contained in the Manual is subject to change,without notice,due to firmware updates or other reasons.T rademarks•and other Hikvision's trademarks and logosare the properties of Hikvision in various jurisdictions.•Other trademarks and logos mentioned are the properties of their respective owners.DisclaimerTO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,THIS MANUAL AND THE PRODUCT DESCRIBED,WITH ITS HARDWARE,SOFTWARE AND FIRMWARE,ARE PROVIDED “AS IS”AND “WITH ALL FAULTS AND ERRORS”.HIKAUTO MAKES NO WARRANTIES,EXPRESS OR IMPLIED,INCLUDING WITHOUT LIMITATION,MERCHANTABILITY,SATISFACTORY QUALITY,OR FITNESS FOR A PARTICULAR PURPOSE.THE USE OF THE PRODUCT BY YOU IS AT YOUR OWN RISK.IN NO EVENT WILL HIKAUTO BE LIABLE TO YOU FOR ANY SPECIAL,CONSEQUENTIAL,INCIDENTAL,OR INDIRECT DAMAGES,INCLUDING,AMONG OTHERS,DAMAGES FOR LOSS OF BUSINESSPROFITS,BUSINESS INTERRUPTION,OR LOSS OF DATA,CORRUPTION OF SYSTEMS,OR LOSS OF DOCUMENTATION,WHETHER BASED ON BREACH OF CONTRACT,TORT (INCLUDING NEGLIGENCE),PRODUCT LIABILITY,OR OTHERWISE,IN CONNECTION WITH THE USE OF THE PRODUCT,EVEN IF HIKAUTO HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR LOSS.YOU ACKNOWLEDGE THAT THE NATURE OF INTERNET PROVIDES FOR INHERENT SECURITY RISKS,AND HIKAUTO SHALL NOT TAKE ANYRESPONSIBILITIES FOR ABNORMAL OPERATION,PRIVACY LEAKAGE OR OTHER DAMAGES RESULTING FROM CYBER-ATTACK,HACKER ATTACK,VIRUS INFECTION,OR OTHER INTERNET SECURITY RISKS;HOWEVER,HIKAUTO WILL PROVIDE TIMELY TECHNICAL SUPPORT IF REQUIRED.YOU AGREE TO USE THIS PRODUCT IN COMPLIANCE WITH ALL APPLICABLE LAWS,AND YOU ARE SOLELY RESPONSIBLE FOR ENSURING THAT YOUR USE CONFORMS TO THE APPLICABLE LAW.ESPECIALLY,YOU ARERESPONSIBLE,FOR USING THIS PRODUCT IN A MANNER THAT DOES NOT INFRINGE ON THE RIGHTS OF THIRD PARTIES,INCLUDING WITHOUTLIMITATION,RIGHTS OF PUBLICITY,INTELLECTUAL PROPERTY RIGHTS,OR DATA PROTECTION AND OTHER PRIVACY RIGHTS.YOU SHALL NOT USE THIS PRODUCT FOR ANY PROHIBITED END-USES,INCLUDING THEDEVELOPMENT OR PRODUCTION OF WEAPONS OF MASS DESTRUCTION,THE DEVELOPMENT OR PRODUCTION OF CHEMICAL OR BIOLOGICALWEAPONS,ANY ACTIVITIES IN THE CONTEXT RELATED TO ANY NUCLEAR EXPLOSIVE OR UNSAFE NUCLEAR FUEL-CYCLE,OR IN SUPPORT OF HUMAN RIGHTS ABUSES.IN THE EVENT OF ANY CONFLICTS BETWEEN THIS MANUAL AND THE APPLICABLE LAW,THE LATER PREVAILS.FCCInformationPlease take attention that changes or modification not expressly approved by the party responsible for compliance could void the user’s authority to operate the equipment.FCCcompliance :Thisequipment has been tested and found to comply with the limits for a Class B digital device,pursuantto part 15of the FCC Rules.These limits are designed to provide reasonable protection against harmful interference when the equipments operated in a residential environment.This equipment generates,uses and can radiate radio frequency energy and,if notinstalled and used in accordance with the instructions,may cause harmful interference to radio communications.However,there is no guarantee that interference will not occur in a particularinstallation.If this equipment does cause harmful interference to radio or television reception,which can be determined by turning the equipment off and on,the user is encouraged to try to correct the interference by one or more of the following measures:—Reorient or relocate the receiving antenna.—Increase the separation between the equipment and receiver.—Connect the equipment into an outlet on a circuit different from that to which the receiver is connected.—Consult the dealer or an experienced radio/TV technician for help FCCConditionsThis device complies with part 15of the FCC Rules.Operation is subject to the following two conditions:1.This device may not cause harmful interference.2.This device must accept any interference received,including interference that may cause undesired operation.The equipment should be installed and operatedwith a minimum distance 20cm between the radiator and your body.EUConformityStatementThis product and -if applicable -the supplied accessories too are marked with "CE"and comply therefore with the applicable harmonizedEuropean standards listed under the RE Directive2014/53/EU,the EMC Directive 2014/30/EU,the LVD Directive 2014/35/EU,the RoHS Directive 2011/65/EU.1.Dashcam ×12.Car Charger ×13.Power Cord ×14.Electrostatic Film ×1er Manual ×16789101112 4.Power Port3.Loudspeaker9.Reset Button8.MicroSD(TF)CardSlot5.Rear CameraPort(Optional TVI Camera)6.Mini-USB Port forConnection toComputer for GPSTransfer and4GModule Connection1.Lens2.Stand7.Microphonethe electrostatic sticker intoposition.Remove unnecessaryair bubbles.Plug car charger into thecigarette lighter,and plug thepower cord into the USBinterface.Adjust the angle forcustomer viewing.You can adjust50°up and down.electrostatic film androute the cable.Scan the QR code to downloadand install HikDashcam app.the dashcam to the app:Open the HikDashcam app.Select the Wi-FiConnection fromlist.Input Wi-Fi password to buildconnection.Parameters can be adjusted on thesettings page.If the Dashcam Wi-Fi is noton the mobile device,please press power button once toswitch to Wi-Fi mode.Dashcam Wi-Fi defaultparameters:•Wi-Fi SSID:HIKVISION-C8-XXXX(XXXX refers to the lasfourcharacters of verification code.)•Default Wi-Fi password:1234567890(To edit password,please go tothe Settings page.)ModelAperturePixelMax.ResolutionAngleStorageG-SensorWi-FiSound Saving While Video RecordingPower SupplyPower ConsumptionOperating Temperature and HumidityInstallation TypeDimensions(L×W×H)WeightAE-DC8012-C8F1.75800W2160P@30fps143°MicroSD(TF)card,32GB to128GBBuilt-in,collision triggered recording and recording lockYesYes5VDC,2A<3.5W-20°C to70°C,95%(MAX)General104.6mm×49.2mm×39.4mmApprox.120gSpecificationsPowerup&ShutdownAccess to car power through cigarette lighter.Device starts recording automatically once the car starts.Device powers off when the car turned off.Note:The cigarette lighter interface of some models may benormal.Please ensure that the device stops working after thecar is turned off.Otherwise,the battery of the vehicle may losepower.RecordingRecordings are divided to into standard video and emergency video.The video voice can be turned on/off via System Settings orHikdashcam APP.SafetyInstructionThese instructions are intended to ensure that users can use theproduct correctly to avoid danger or property loss.Cautions:Injuryor equipment damage may occur if any of the cautionsare neglected.•In the use of the dashcam,you must be in strict compliance with thelocal laws and regulations.•You are recommended to install the dashcam on the location of rearmirror to ensure the dashcam can record with the best surveillance view.DO NOT install the dashcam on the location that will block the driver’ssight.•Keep the user manual for future reference.See initialconnection of dashcam in user manual.•Purchase the MicroSD(TF)card from authorized retailer.Toensure safe and stable data storage,it is recommended touse MicroSD(TF)card of Class10or above.•Format the new MicroSD(TF)card first before being used.•To protect MicroSD(TF)card from damage,ensure the dashcamis is powered down before installing and uninstalling MicroSD(TF)card.•If the dashcam is directly connected with the vehicle powersystem,you are recommended to power off the dashcam whenthe engine is off.Disconnect cigarette lighter to avoidinsufficient voltage and abnormal startup.Reconnect cigarettelighter to ensure dashcam will work normally upon startup.•Operating temperature is at-20C to70C(-4F to158F).Toprotect the dashcam,avoid it being used in high or lowtemperatures,or high-humidity environment.Avoid using thedashcam in rain or dust.•The manual is subject to updating at any given time.Thefunctions of the dashcam may vary according to different models.*The driving assistance function of the device only sends alarms orwarnings to the driver and cannot impair the driver’s judgement andoperation.The device should be used carefully in avoiding accident andtraffic violation.Pedestrian or object recognition failure or recognition errormay occur due to external factors.DO NOT solely rely on the drivingassistance function.。
Canon imageRUNNER C3125i A3 彩色多功能打印机说明书

HIGH QUALITY COLOR A3 MULTIFUNCTION PRINTER DELIVERING VALUE, EFFICIENCY AND EASE OF USECanon imageRUNNER C3125iThis flat configuration is for illustration purpose only. For a complete list of options and the exact compatibility, please refer to the Online Product Configurator or consult your sales representative.*Copy Tray-J2 requires 3 Way Unit-D1MAIN CONFIGURATION OPTIONSiR C3125iCABINET TYPE-R•Raises the device, no additional media supplyCASSETTE FEEDING UNIT-AP1• Supports up to A3• Media weight 52 – 220 GSM •2 x 550 sheets (80 gsm)UTILITY TRAY-B1COPY TRAY-J2*INNER 2WAY TRAY-J1• Separates copies, prints and faxes •Adds a second internal output trayINNER FINISHER – K1• 2-tray, 600 -sheet capacity • Corner and double stapling up to 50 sheets (80 gsm)•Supports Eco stapling 4 sheets (80 gsm) and Staple On Demand 40 sheets (80 gsm)MAIN UNITMachine type A3 Color Laser MultifunctionalCore functions Print, Copy, Scan, Send and Optional Fax Processor Canon Dual Custom Processor (Shared) Control Panel12.7 cm (5 inch) TFT LCD WVGA Color Touch panel Memory Standard: 2.0GB RAMInterface Connection NETWORKStandard: 1000BaseT/100Base-TX/10Base-T,Wireless LAN (IEEE802.11b/g/n)Optional: NFCOTHERSStandard: USB 2.0 (Host) x 2, USB 2.0 (Device) x 1Optional: Copy Control InterfacePaper Supply capacity (A4, 80gsm)Standard: 1,200 Sheets100-sheets Multi-purpose tray x 1, 550-sheets Paper cassette x 2Maximum: 2,300 Sheets(with optional Cassette Feeding Unit-AP1)Paper output capacity (A4, 80gsm)Standard: 250 Sheets Maximum: 700 Sheets(with Inner Finisher-K1 and Copy Tray-J2)Finishing capabilities Standard model: Collate, GroupFinisher model (Inner Finisher-K1): Collate, Group,Offset, Staple, Eco Staple, Staple On Demand Supported Media Types Multi-purpose Tray:Thin, Plain, Heavy*, Recycled, Coated*, Color,Tracing, Bond, Transparency, Label, Pre-punched,Envelope* SRA3 is unsupported for Coated (257-300gsm) andHeavy (257-300gsm) paper.Paper Cassette (Upper/Lower Cassette):Thin, Plain, Heavy, Recycled, Color, Bond,Transparency, Pre-punched, Envelope**Lower Cassette: Envelope Feeder Attachment A is required. Supported media sizes Multi-purpose tray:Standard size: SRA3, A3, A4, A4R, A5, A5R, A6R,B4, B5, B5R, Envelope [COM10 No.10, Monarch,ISO-C5, DL]Custom size: 98.4 x 139.7 mm to 320.0 x 457.2 mmPaper Cassette (Upper Cassette):Standard size: A4, A5, A5R, A6R, B5Custom size: 105.0 x 148.0 mm up to 297.0 x215.9 mmEnvelope: ISO-C5Paper Cassette (Lower Cassette):Standard size: A3, A4, A4R, A5, A5R, A6R, B4,B5, B5RCustom size: 105.0 x 148.0 mm up to 304.8 x 457.2 mmEnvelope: [COM10 No.10, Monarch, DL]**Envelope Feeder Attachment A is required. Supported media weights Multi-purpose tray: 52 to 300 gsm** SRA3 is unsupported for Coated (257-300gsm) andHeavy (257-300gsm) paper.Paper Cassette (Upper/Lower Cassette):52 to 220 gsmDuplex: 52 to 220 gsmWarm-Up Time From Sleep Mode: 10 Seconds or LessFrom Power On: 19 Seconds or Less**Time from device power-on, until copy ready(not print reservation)Dimensions (W x D x H)565 x 664 x 880 mmInstallation Space (W x D)1241 x 1217 mm*with Cassette open + 100 mm gap around the main body Weight Approx. 67.3 kg without tonerPRINT SPECIFICATIONSPrint Speed (BW/CL)Up to 25/25 ppm (A4, A5, A5R, A6R), Up to 15/15ppm (A3), Up to 20/20 ppm (A4R)Print Resolution (dpi)600 x 600, 1,200 x 1,200Page descriptionlanguagesStandard: UFR II, PCL6, Adobe®PostScript®3TM Direct Print Supported file types: PDF, EPS, TIFF/JPEG, XPS**XPS is supported from LPR command print only.Printing from mobile andcloudAirPrint, Mopria, Google Cloud Print, CanonBusiness Print and uniFLOW OnlineA range of software solutions is available toprovide printing from mobile devices andcloud-based services depending on yourrequirements. Please contact your salesrepresentative for further information.Fonts PCL fonts: 93 Roman, 10 Bitmap fonts, 2 OCRfonts, Barcode fonts*, PS fonts: 136 Roman* Barcode Printing Kit-D1 is requiredPrint Features Secure Print, Header/Footer, Page Layout,Two-sided Printing, Mixed Paper Sizes/Orientations, Toner Reduction, Poster Printing,Print DateOperating System UFRII: Windows®7/8.1/10/Server2008/Server2008R2/Server2012/Server2012 R2/Server2016/Server2019, Mac OS X (10.10 or later)PCL: Windows®7/8.1/10/Server2008/Server2008R2/Server2012/Server2012 R2/Server2016/Server2019PS: Windows®7/8.1/10/Server2008/Server2008R2/Server2012/Server2012 R2/Server2016/Server2019, Mac OS X (10.10 or later)PPD: Windows®7/8.1/10, MAC OS X (10.9 or later)COPY SPECIFICATIONSCopy Speed (BW/CL)Up to 25/25 ppm (A4, A5, A5R, A6R), Up to 15/15ppm (A3), Up to 20/20 ppm (A4R)First-Copy-Out Time (A4)(BW/CL)Approx. 5.9/8.2 seconds or lessCopy resolution (dpi)600 × 600Multiple Copies Up to 999 copiesCopy Density Automatic or Manual (9 Levels) Magnification Variable zoom: 25% - 400% (1% Increments)Preset reduction/enlargement: 25%, 50%, 70%,100% (1:1) / 141%, 200%, 400%Copy Features Preset R/E Ratios by Area, Two-Sided, DensityAdjustment, Original Type Selection, Book to TwoPages, Two-sided Original, Sort, N on 1, Different SizeOriginals, Sharpness, Erase Frame, Copy IDCard, Copy Passport, Color ModeSCAN SPECIFICATIONSType Standard: Duplexing Automatic Document Feeder[2-sided to 2-sided (Automatic with DADF)]Optional: Color Platen (Platen Cover-Y2) Document Feeder PaperCapacity (80 gsm)100 SheetsAcceptable Originals andweightsPlaten: Sheet, Book, and 3-Dimensional objectsDocument Feeder media weight:1-sided scanning: 38 to 128 gsm (BW),64 to 128 gsm (CL)2-sided scanning: 50 to 128 gsm (BW),64 to 128 gsm (CL)Supported media sizes Platen: max. scanning size: 297.0 x 431.8 mmDocument Feeder media size:A3, A4, A4R, A5, A5R, B4, B5, B5R, B6Custom size: 128.0 x 139.7 mm to 297.0 x 431.8 mm Scan Speed(ipm: BW/CL; A4)1-sided Scanning:55/55 (300 x 300 dpi, send),30/30 (600 x 600 dpi, copy),2-sided Scanning:27.5/27.5 (300 x 300 dpi, send),15/15 (600 x 600 dpi, copy)Scan Resolution (dpi)Scan for Copy: up to 600 x 600Scan for Send: (Push) up to 600 x 600,(Pull) up to 600 x 600Scan for Fax: up to 600 x 600Pull Scan Specifications ScanGear MF. For both TWAIN and WIASupported OS: Windows® 7/8.1/10Scan Method Push Scan, Pull Scan, Scan to Network, Scan tomemory media (USB Memory Key), Scan tocloud-based services (uniFLOW)SEND SPECIFICATIONSDestination Standard: E-mail/Internet FAX (SMTP), SMB, FTPOptional: Super G3 FAXAddress Book LDAP (50)/Local (300)/Speed dial (281)Send resolution (dpi)Push: 300 x 300 (Email/SMB/FTP), 192 x 204 (IFAX)Pull: 50 x 50, 75 x 75, 150 x 150, 200 x 200, 300 x300, 400 x 400, 600 x 600 Communication protocol FTP (TCP/IP), SMB (TCP/IP), SMTPFile Format Standard: TIFF, JPEG*, PDF(Compact, Searchable, Encrypted, Digital Signature)*Single Page OnlyUniversal Send Features Original Type Selection, Two-sided Original,Different-size Originals, Density Adjustment,Sharpness, File Name, Subject/Message, Reply-to,E-mail Priority, TX Report, Original ContentOrientationFAX SPECIFICATIONSMaximum Number ofConnection Lines1Modem Speed Super G3: 33.6 kbpsG3: 14.4 kbpsCompression Method MH, MR, MMR, JBIGResolution (dpi)400 x 400 (Ultra Fine), 200 x 400 (SuperFine), 200 x 200 (Fine/Photo), 200 x 100(Normal)Sending/Receiving Size Sending: A3, A4, A4R, A5*2, A5R*2, B4, B5*1, B5R*2 Receiving: A3, A4, A4R, A5R, B4, B5, B5R*1 Sent as B4*2 Sent as A4FAX memory Up to 512 pagesSpeed dials Max. 281Group dials/destinations Max. 299 dialsSequential broadcast Max. 310 addressesMemory backup YesFax Features Direct Send, TX Report, SequentialBroadcastingSECURITYSPECIFICATIONSAuthentication and Access Control Standard:Department ID Authentication (Department ID and PIN Login, Function Level Login), uniFLOW Online Express (PIN Login, Card Login, Card and PIN Login)Document Security Print Security (Secure Print, uniFLOW SecurePrint*), Scan Security (Encrypted PDF, DeviceSignature PDF), Send Data Security(Restricted E-mail/File send functions,Confirming FAX number, Allow/Restrict FaxDriver Transmissions, Allow/Restrict Sendingfrom History)*Requires uniFLOW Online / uniFLOW Network Security IPSec, IEEE802.1X authentication, SNMPv3,Firewall Functionality (IP/MAC AddressFiltering), Enabling/Disabling Remote UI, G3FAX separation from LAN, USB Port separationfrom LANDevice Security Standard: Storage Initialize, Job LogConceal Function, Protecting MFDSoftware IntegrityDevice Management and Auditing Standard: Administrator Password, DigitalCertificate and Key Management, SecurityPolicy SettingENVIRONMENTALSPECIFICATIONSOperatingEnvironmentTemperature: 10 to 30 ºCHumidity: 20 to 80% RH (Relative Humidity)Power source110-127V 60Hz 15A220-240V 50/60Hz 10APower consumption Maximum: Approx. 1,5 kW or LessAverage: Approx. 412.0W (120V); 431.0 W (230V)(while printing/copying)Standby: Approx. 35.1 (120V) 34.3 W (230V)*1Sleep mode: Approx. 2W*2, Approx. 1W*3*1 Reference value: measured one unit*2 Wireless LAN power serve mode OFF*3 Wireless LAN power serve mode ON*2,*3S leep mode is not available in all circumstances due tocertain settings.Typical Electricity Consumption (TEC): 0.29 kWh** As per US ENERGY STAR Version 3.0Noise levels (BW/CL)Sound Power Level (LWA,m)(1-sided/2-sided)Active (BW): 6.1/6.4 B*1, Kv 0.3/0.3 B*1Active (CL): 6.2/6.4 B*1, Kv 0.3/0.3 B*1Sound Pressure (LpAm)Bystander's position: (1-sided/2-sided)Active (BW): 47/50 dB*1,Active (CL): 48/50 dB*1,Standby: No noise*2*1R eference value: measured only one unit withISO7779, described with ISO9296:2017*2N o noise means that the emission sound pressurelevel of each bystander position is lower than theabsolute standard with the background noise ofISO 7779.Standards Blue AngelCONSUMABLESToner Cartridge/s GPR-53 TONER BK/C/M/YToner (EstimatedYield @ 5% Coverage)GPR-53 TONER BK: 36,000 pagesGPR-53 TONER C/M/Y: 19,000 pagesGPR-53L TONER C/M/Y: 8,500 pagesSOFTWARE ANDPRINTERMANAGEMENTTracking andreportingUniversal Login Manager (ULM):Manage your costs easily by using the embeddedreporting capability to identify and control costson a user-based level by device.uniFLOW Online Express*: Combining with ULMyou can gain further control and highlightexpenditures per users/department and pinpointwhere costs can be scaled down from a centralcloud based location.*Installation, activation and registration requiredRemote managementtoolsiW Management Console:Server-based software for centralisedmanagement of afleet of devices (includes monitoring orconsumables,status monitoring and alerts, distribution of address books,configuration settings, firmware and MEAP applications,meter capture and reporting, driver and resourcemanagement)imageWARE REMOTE:Compatible with imageWARE services viaembedded RDS (Enables meter capture, automaticconsumables management, remote diagnostics andreporting for service providers to offer efficient, fast andproactive maintenance)Content Delivery System:Allows the Remote distribution of firmware, iRoptions and MEAP applications; Remote UserInterface (RUI) Web based interface to eachdevice that helps to provideremote device management and controlCustomization options Application LibraryScanning software ScanGear MF Scanner DriverOptimization tools Canon Driver Configuration ToolPAPER SUPPLY OPTIONSCassette Feeding Unit-AP1Paper Capacity: 550 sheets x 2 (80 gsm) Paper Type: Thin, Plain, Recycled, Color, Heavy, Bond, Transparency, Pre-punchedPaper Size: A3, A4, A4R, A5, A5R, A6R, B4, B5 ,B5R, Custom Size: 105.0 x 148 mm to 304.8 x 457.2 mm Paper Weight: 52 to 220 gsmPower Supply: From the Main Unit Dimensions (W x D x H): 565 x 615 x 248 mm Weight: Approx. 16 kgOUTPUT OPTIONSInner Finisher-K1Tray Capacity (with 80gsm paper):Number of Trays: 2Lower Tray1: A4, A5, A5R, B5: up to 500 sheetsSRA3, A3, A4R, B4, B5R: up to 250 sheetsA6R: up to 30 sheetsUpper Tray2: A4, A5, A5R, B5: up to 100 sheetsSRA3, A3, A4R, A6R, B4, B5R: up to 50 sheetsPaper Weight:Lower Tray1: 52 to 256 gsmUpper Tray2: 52 to 300 gsmStaple Position: Corner, DoubleStaple Capacity:A4/B5: 50 sheets (52 to 90 gsm)A3/B4/A4R: 30 sheets (52 to 90 gsm)Eco Staple:A3/A4/B4/B5: 5 sheets (52 to 64 gsm)4 sheets (65 to 81.4 gsm)3 sheets (82 to 105 gsm)Staple On Demand: approx 40 sheets (80 gsm)Power Supply: From the main unitDimensions (W x D x H): 634 mm × 525 mm × 188 mm(when the extension tray and rotary tray are extended)Weight: Approx. 8 kgSoftware & SolutionsCompatibilityInner 2way Tray-J1Paper Capacity (with 80 gsm paper)-Upper tray:SRA3, A3, A4, A4R, A5, A5R, A6R, B4, B5, B5R,Custom size (98.4 x 139.7 mm to 320.0 x 457.2mm): 100 sheets-Lower tray:A4, A5, A5R, A6R, B5, B5R: up to 250 sheetsSRA3, A3, A4R, B4, Custom Size (98.4×139.7 to320.0×457.2 mm ): up to 100 sheetsPaper Weight: 52 to 300 gsmDimensions (W x D x H): 426 x 407 x 76 mmWeight: 0.7 kg*Requires 3 Way Unit-D1Copy Tray-J2Capacity: 100 sheets (80 gsm)* A4, B5, B5R, A5RDimensions (W x D x H): 444 × 373 × 176 mm(attached to the main unit,when the extensiontray is extended)Weight: Approx. 0.5 kg*Requires 3 Way Unit-D1HARDWAREACCESSORIEScard readers IC Card Reader Attachment-B2COPY CARD READER-F1COPY CARD READER ATTACHMENT-H3others UTILITY TRAY-B13 Way Unit-D1SYSTEM ANDCONTROLLEROPTIONSprint accessories PS Printer Kit-BK1barcode printing BARCODE PRINTING KIT-D1system accessories COPY CONTROL INTERFACE KIT-D1NFC KIT-D1fax accessories SUPER G3 FAX BOARD-AV3OTHER OPTIONSaccessibilityaccessoriesADF ACCESS HANDLE-A1staple cartridge STAPLE-P1Canon U.S.A., Latin America GroupOne Canon ParkMelville, NY 11747/Color_imageRUNNER。
sd卡 crc 计算 c语言

sd卡crc 计算c语言全文共四篇示例,供读者参考第一篇示例:SD卡在现代的生活中扮演着非常重要的角色,它是一种被广泛使用的存储设备,可以存储大量的数据,比如照片、视频、音乐等。
在使用SD卡的过程中,我们经常会遇到一些问题,比如数据损坏、文件无法访问等。
其中一个常见的问题就是CRC校验错误,这个错误会导致数据无法正确读取,从而产生一系列问题。
CRC(Cyclic Redundancy Check)校验是一种常用的错误校验方法,它通过对数据进行计算得到一个校验值,然后将这个校验值附加在数据中。
接收方在接收到数据后,也会对数据进行CRC校验,如果计算得到的校验值与接收到的校验值不一致,就说明数据出现了错误。
在SD卡中,CRC校验被广泛应用,以确保数据的完整性和正确性。
在本文中,我们将介绍如何在C语言中计算SD卡CRC校验,以及如何应用CRC校验来检测和修复数据错误。
我们来看一下CRC校验算法的原理。
CRC校验实际上是通过对数据进行除法运算得到一个余数,这个余数就是CRC校验值。
具体的计算方法可以通过以下伪代码表示:1. 初始化CRC校验值为0xFFFF(16位CRC校验值,可以根据实际情况选择不同位数的CRC校验值)2. 逐个字节处理数据,对每个字节进行以下操作:- 将当前字节与CRC校验值进行异或操作- 循环8次,对当前字节的每一位进行操作:- 如果当前位为1,执行CRC校验多项式的异或操作- 否则,不进行任何操作3. 处理完所有数据后,将得到的CRC校验值与0xFFFF进行异或操作,得到最终的CRC校验值以上就是CRC校验的基本算法,下面我们用C语言实现这个算法:```c#include <stdio.h>#define POLY 0x1021unsigned short crc16_ccitt(const unsigned char *buf, int len) {unsigned short crc = 0xFFFF;for (int i = 0; i < len; i++) {crc ^= (buf[i] << 8);for (int j = 0; j < 8; j++) {if (crc & 0x8000) {crc = (crc << 1) ^ POLY;} else {crc <<= 1;}}}return crc;}通过这段代码,我们可以很容易地在C语言中计算SD卡的CRC 校验值。
AT88SC0808C Atmel 密码型存储器数据手册说明书

AT88SC0808CAtmel CryptoMemory, 8-KbitSUMMARY DATASHEETFeatures • One of a family of nine devices with user memories from 1-Kbit to 256-Kbit •8-Kbit (1-Kbyte) EEPROM user memory• Eight 128-byte (1-Kbit) zones • Self-timed write cycle• Single byte or 16-byte page write mode • Programmable access rights for each zone• 2-Kbit configuration zone• 37-byte OTP area for user-defined codes• 160-byte area for user-defined keys and passwords •High security features• 64-bit mutual authentication protocol (under license of ELVA) • Encrypted checksum • Stream encryption• Four key sets for authentication and encryption • Eight sets of two 24-bit passwords • Anti-tearing function• Voltage and frequency monitor•Smart card features• ISO 7816 Class A (5V) or Class B (3V) operation• ISO 7816-3 asynchronous T = 0 protocol (Gemplus ®patent) * • Multiple zones, key sets and passwords for multi-application use • Synchronous 2-wire serial interface for faster device initialization * • Programmable 8-byte answer-to-reset register •ISO 7816-2 compliant modules•Embedded application features• Low voltage operation: 2.7V to 5.5V• Secure nonvolatile storage for sensitive system or user information • 2-wire serial interface• 1.0MHz compatibility for fast operation• Standard 8-lead plastic packages, green compliant (exceeds RoHS) •Same pinout as 2-wire Serial EEPROMs•High reliability• Endurance: 100,000 cycles • Data retention: 10 years • ESD protection: 4,000V min* Note: Modules available with either T=0 / 2-wire modes or 2-wire mode onlyThis is a summary document. The complete document is available on the Atmel website at .AT88SC0808C [SUMMARY DATASHEET]Atmel-2024MS-CryptoMem-AT88SC0808C-Datasheet-Summary_1220132Table 1. Pin AssignmentFigure 1.Pin Configuration1. DescriptionThe Atmel ®AT88SC0808C member of the Atmel CryptoMemory ®family is a high-performance secure memory providing 8-Kbits of user memory with advanced security and cryptographic features built in. The user memory is divided into eight 128-byte zones, each of which may be individually set with different security access rights or effectively combined together to provide space for one to eight data files.1.1 Smart Card ApplicationsThe AT88SC0808C provides high security, low cost, and ease of implementation without the need for a microprocessor operating system. The embedded cryptographic engine provides for dynamic and symmetric mutual authentication between the device and host, as well as performing stream encryption for all data and passwords exchanged between the device and host. Up to four unique key sets may be used for these operations. The AT88SC0808C offers the ability to communicate with virtually any smart card reader using the asynchronous T = 0 protocol (Gemplus Patent) defined in ISO 7816-3.1.2 Embedded ApplicationsThrough dynamic and symmetric mutual authentication, data encryption, and the use of encrypted checksums, theAT88SC0808C provides a secure place for storage of sensitive information within a system. With its tamper detection circuits, this information remains safe even under attack. A 2-wire serial interface running at 1.0MHz is used for fast and efficientcommunications with up to 15 devices that may be individually addressed. The AT88SC0808C is available in industry standard 8-lead packages with the same familiar pinout as 2-wire Serial EEPROMs.V CC =C1RST=C2SCL/CLK=C3NC=C4ISO Smart Card ModuleC5=GND C6=NC C7=SDA/IO C8=NCNC NC NC GND123487658-lead SOIC, PDIP V CC NC SCL SDAV CC =C1NC=C2SCL/CLK=C3NC=C4TWI Smart Card ModuleC5=GND C6=NC C7=SDA/IO C8=NCAT88SC0808C [SUMMARY DATASHEET]Atmel-2024MS-CryptoMem-AT88SC0808C-Datasheet-Summary_1220133Figure 1-1. Block Diagram2.Pin Descriptions2.1Supply Voltage (V CC )The V CC input is a 2.7V to 5.5V positive voltage supplied by the host.2.2 Clock (SCL/CLK)In the asynchronous T = 0 protocol, the SCL/CLK input is used to provide the device with a carrier frequency f . The nominal length of one bit emitted on I/O is defined as an “elementary time unit” (ETU) and is equal to 372/f. When the synchronous protocol is used, the SCL/CLK input is used to positive edge clock data into the device and negative edge clock data out of the device.2.3 Reset (RST)The AT88SC0808C provides an ISO 7816-3 compliant asynchronous answer to reset sequence. When the reset sequence is activated, the device will output the data programmed into the 64-bit answer-to-reset register. An internal pull-up on the RST input pad allows the device to be used in synchronous mode without bonding RST. The AT88SC0808C does not support the synchronous answer-to-reset sequence2.4 Serial Data (SDA/IO)The SDA pin is bidirectional for serial data transfer. This pin is open-drain driven and may be wired with any number of other open drain or open collector devices. An external pull-up resistor should be connected between SDA and V CC . The value of this resistor and the system capacitance loading the SDA bus will determine the rise time of SDA. This rise time will determine the maximum frequency during read operations. Low value pull-up resistors will allow higher frequency operations while drawing higher average power. SDA/IO information applies to both asynchronous and synchronous protocols.When the synchronous protocol is used, the SCL/CLK input is used to positive edge clock data into the device and negative edge clock data out of the device.V CCAT88SC0808C [SUMMARY DATASHEET]Atmel-2024MS-CryptoMem-AT88SC0808C-Datasheet-Summary_12201343.*NOTICE: Stresses beyond those listed under “AbsoluteMaximum Ratings” may cause permanent damage to the device. This is a stress rating only and functional operation of the device at these or any other condition beyond those indicated in the operational sections of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods of time may affect device reliability.Table 3-1.DC CharacteristicsNote:1. V IL min and V IH max are reference only and are not tested2. To prevent latch up conditions from occurring during power up of the AT88SCxxxxC, V CC must be turned onbefore applying V IH . For powering down, V IH must be removed before turning V CC offAT88SC0808C [SUMMARY DATASHEET]Atmel-2024MS-CryptoMem-AT88SC0808C-Datasheet-Summary_1220135Table 3-2.AC CharacteristicsApplicable over recommended operating range from V CC = +2.7 to 5.5V,4. Device Operation for Synchronous ProtocolsClock and Data Transitions:The SDA pin is normally pulled high with an external device. Data on the SDA pin may change only during SCL low time periods (see Figure 4-3 on page 7). Data changes during SCL high periods will indicate a start or stop condition as defined below.Start Condition:A high-to-low transition of SDA with SCL high is a start condition which must precede any other command (see Figure 4-4 on page 7).Stop Condition:A low-to-high transition of SDA with SCL high is a stop condition. After a read sequence, the stop command will place the EEPROM in a standby power mode (see Figure 4-4 on page 7).Acknowledge:All addresses and data words are serially transmitted to and from the EEPROM in 8-bit words. The EEPROM sends a zero to acknowledge that it has received each word. This happens during the ninth clock cycle (see Figure 4-5 on page 7). Memory Reset:After an interruption in protocol, power loss or system reset, any 2-wire part can be reset by following these steps: 1. Clock up to nine cycles2. Look for SDA high in each cycle while SCL is high3. Create a start conditionAT88SC0808C [SUMMARY DATASHEET] Atmel-2024MS-CryptoMem-AT88SC0808C-Datasheet-Summary_1220136 Figure 4-1. Bus Timing for 2-wire Communications:SCL: Serial Clock, SDA – Serial Data I/OFigure 4-2. Write Cycle Timing:SCL: Serial Clock, SDA – Serial Data I/ONote: The write cycle time t WR is the time from a valid stop condition of a write sequence to the end of the internalclear/write cycleSCLSDA INSDA OUTSTOPCONDITIONSTARTCONDITIONSCLSDAAT88SC0808C [SUMMARY DATASHEET]Atmel-2024MS-CryptoMem-AT88SC0808C-Datasheet-Summary_1220137Figure 4-3. Data ValidityFigure 4-4. Start and Stop DefinitionsFigure 4-5. Output AcknowledgeDATA CHANGE ALLOWEDDATA STABLEDATA STABLESDASCLSDASCLSTART STOPSCLDAT A INDAT A OUTEG D E L W O N K C A T R A T S 981AT88SC0808C [SUMMARY DATASHEET]Atmel-2024MS-CryptoMem-AT88SC0808C-Datasheet-Summary_12201385.Device Architecture5.1User ZonesThe EEPROM user memory is divided into eight zones of 1024 bits each. Multiple zones allow for different types of data or files to be stored in different zones. Access to the user zones is allowed only after security requirements have been met. These security requirements are defined by the user during the personalization of the device in the configuration memory. If the same security requirements are selected for multiple zones, then these zones may effectively be accessed as one larger zone.6. Control LogicAccess to the user zones occurs only through the control logic built into the device. This logic is configurable through access registers, key registers and keys programmed into the configuration memory during device personalization. Also implemented in the control logic is a cryptographic engine for performing the various higher-level security functions of the device.AT88SC0808C [SUMMARY DATASHEET]Atmel-2024MS-CryptoMem-AT88SC0808C-Datasheet-Summary_12201397. Configuration MemoryThe configuration memory consists of 2048 bits of EEPROM memory used for storing passwords, keys and codes and defining security levels to be used for each user zone. Access rights to the configuration memory are defined in the control logic and may not be altered by the user.AT88SC0808C [SUMMARY DATASHEET]Atmel-2024MS-CryptoMem-AT88SC0808C-Datasheet-Summary_122013108. Security FusesThere are three fuses on the device that must be blown during the device personalization process. Each fuse locks certain portions of the configuration memory as OTP memory. Fuses are designed for the module manufacturer, card manufacturer and card issuer and should be blown in sequence, although all programming of the device and blowing of the fuses may be performed at one final step.9. Protocol selectionThe AT88SC0808C supports two different communication protocols.• Smart Card Applications:The asynchronous T = 0 protocol defined by ISO 7816-3 is used for compatibility with the industry’s standard smart card readers• Embedded Applications:A 2-wire serial interface is used for fast and efficient communication with logic or controllersThe power-up sequence determines which of the two communication protocols will be used.9.1 Asynchronous T = 0 ProtocolThis power-up sequence complies with ISO 7816-3 for a cold reset in smart card applications.• V CC goes high; RST, I/O-SDA and CLK-SCL are low • Set I/O-SDA in receive mode • Provide a clock signal to CLK-SCL •RST goes high after 400 clock cyclesThe device will respond with a 64-bit ATR code, including historical bytes to indicate the memory density within theCryptoMemory family. Once the asynchronous mode has been selected, it is not possible to switch to the synchronous mode without powering off the device.Figure 9-1. Asynchronous T = 0 Protocol (Gemplus Patent)V cc I/O-SDARSTCLK-SCL9.2 Synchronous 2-wire Serial InterfaceThe synchronous mode is the default after powering up V CC due to an internal pull-up on RST. For embedded applications using CryptoMemory in standard plastic packages, this is the only communication protocol.• Power-up V CC , RST goes high also• After stable V CC , CLK-SCL and I/O-SDA may be drivenFigure 9-2. Synchronous 2-wire ProtocolNote:Five clock pulses must be sent before the first command is issued10. Communication Security ModesCommunications between the device and host operate in three basic modes. Standard mode is the default mode for the device after power-up. Authentication mode is activated by a successful authentication sequence. Encryption mode is activated by a successful encryption activation following a successful authentication. Table 10-1. Communication Security Modes (1)Note:1. Configuration data include viewable areas of the configuration zone except the passwords:• MDC: Modification Detection Code •MAC: Message Authentication CodeV cc I/O-SDARST CLK-SCL1234511. Security Options11.1 Anti-tearingIn the event of a power loss during a write cycle, the integrity of the device’s stored data may be recovered. This function is optional: the host may choose to activate the anti-tearing function, depending on application requirements. When anti-tearing is active, write commands take longer to execute, since more write cycles are required to complete them, and data are limited to eight bytes.Data are written first to a buffer zone in EEPROM instead of the intended destination address, but with the same accessconditions. The data are then written in the required location. If this second write cycle is interrupted due to a power loss, the device will automatically recover the data from the system buffer zone at the next power-up.In 2-wire mode, the host is required to perform ACK polling for up to 8mS after write commands when anti-tearing is active. At power-up, the host is required to perform ACK polling, in some cases for up to 2mS, in the event that the device needs to carry out the data recovery process.11.2 Write LockIf a user zone is configured in the write lock mode, the lowest address byte of an 8-byte page constitutes a write access byte for the bytes of that page.Example: The write lock byte at $080 controls the bytes from $080 to $087The write lock byte may also be locked by writing its least significant (rightmost) bit to “0”. Moreover, when write lock mode is activated, the write lock byte can only be programmed — that is, bits written to “0” cannot return to “1”.In the write lock configuration, only one byte can be written at a time. Even if several bytes are received, only the first byte will be taken into account by the device.12. Password VerificationPasswords may be used to protect read and/or write access of any user zone. When a valid password is presented, it ismemorized and active until power is turned off, unless a new password is presented or RST becomes active. There are eight password sets that may be used to protect any user zone. Only one password is active at a time, but write passwords give read access also..12.1 Authentication ProtocolThe access to a user zone may be protected by an authentication protocol. Any one of four keys may be selected to use with a user zone.The authentication success is memorized and active as long as the chip is powered, unless a new authentication is initialized or RST becomes active. If the new authentication request is not validated, the card loses its previous authentication and itshould be presented again. Only the last request is memorized.Note: Password and authentication may be presented at any time and in any order. If the trials limit has been reached (after four consecutive incorrect attempts), the password verification or authentication process will not be takeninto accountFigure 12-1. Password and Authentication OperationsREAD ACCESS12.2 ChecksumThe AT88SC0808C implements a data validity check function in the form of a checksum, which may function in standard,authentication or encryption modes.In the standard mode, the checksum is implemented as a Modification Detection Code (MDC), in which the host may read an MDC from the device in order to verify that the data sent was received correctly.In the authentication and encryption modes, the checksum becomes more powerful since it provides a bidirectional dataintegrity check and data origin authentication capability in the form of a Message Authentication Code (MAC). Only thehost/device that carried out a valid authentication is capable of computing a valid MAC. While operating in the authentication or encryption modes, the use of a MAC is required. For an ingoing command, if the device calculates a MAC different from the MAC transmitted by the host, not only is the command abandoned but the mode is also reset. A new authentication and/or encryption activation will be required to reactivate the MAC.12.3 EncryptionThe data exchanged between the device and the host during read, write and verify password commands may be encrypted to ensure data confidentiality.The issuer may choose to require encryption for a user zone by settings made in the configuration memory. Any one of four keys may be selected for use with a user zone. In this case, activation of the encryption mode is required in order to read/write data in the zone and only encrypted data will be transmitted. Even if not required, the host may elect to activate encryption provided the proper keys are known.12.4 Supervisor ModeEnabling this feature allows the holder of one specific password to gain full access to all eight password sets, including the ability to change passwords.12.5 Modify ForbiddenNo write access is allowed in a user zone protected with this feature at any time. The user zone must be written during device personalization prior to blowing the security fuses.12.6 Program OnlyFor a user zone protected by this feature, data within the zone may be changed from a “1” to a “0”, but never from a “0” to a “1”.13. Initial Device ProgrammingTo enable the security features of CryptoMemory, the device must first be personalized to set up several registers and load in the appropriate passwords and keys. This is accomplished through programming the configuration memory of CryptoMemory using simple write and read commands. To gain access to the configuration memory, the secure code must first besuccessfully presented. For the AT88SC0808C device, the secure code is $22 E8 3F. After writing and verifying data in the configuration memory, the security fuses must be blown to lock this information in the device. For additional information on personalizing CryptoMemory, please see the application notes Programming CryptoMemory for Embedded Applications and Initializing CryptoMemory for Smart Card Applications (at ).14.Note: 1. Formal drawings may be obtained from an Atmel sales office2. Both the J and P module packages are used for either ISO (T=0 / 2-wire mode) or TWI (2-wire mode only)15. Packaging InformationOrdering Code: MJ or MJTG Ordering Code: MP or MPTGModule Size: M2Dimension*: 12.6 x 11.4 [mm] Glob Top: Round - ∅ 8.5 [mm] Thickness: 0.58 [mm]Pitch: 14.25mm Module Size: M2Dimension*: 12.6 x 11.4 [mm]Glob Top: Square - 8.8 x 8.8 [mm] Thickness: 0.58 [mm]Pitch: 14.25mmNote: *The module dimensions listed refer to the dimensions of the exposed metal contact area. The actual dimensions of the module after excise or punching from the carrier tape are generally 0.4mm greater in both directions (i.e., apunched M2 module will yield 13.0 x 11.8mm)15.1 Atmel AT88SC0808C Package Marking Information15.2 Ordering Code: SH8S1 – 8-lead JEDEC SOIC15.3 Ordering Code: PU8P3 – 8-lead PDIP16. Revision History。
ARM指令速查手册

ARM Instruction SetQuick Reference CardKey to Tables{cond}Refer to Table Condition Field {cond}<a_mode2>Refer to Table Addressing Mode 2<Oprnd2>Refer to Table Operand 2<a_mode2P>Refer to Table Addressing Mode 2 (Post-indexed only)<fields>Refer to Table PSR fields<a_mode3>Refer to Table Addressing Mode 3{S}Updates condition flags if S present<a_mode4L>Refer to Table Addressing Mode 4 (Block load or Stack pop) C*, V*Flag is unpredictable after these instructions in Architecture v4 and earlier<a_mode4S>Refer to Table Addressing Mode 4 (Block store or Stack push) Q Sticky flag. Always updates on overflow (no S option). Read and reset using MRS and MSR<a_mode5>Refer to Table Addressing Mode 5x,y B meaning half-register [15:0], or T meaning [31:16]<reglist> A comma-separated list of registers, enclosed in braces ( { and } )<immed_8r> A 32-bit constant, formed by right-rotating an 8-bit value by an even number of bits{!}Updates base register after data transfer if ! present<immed_8*4> A 10-bit constant, formed by left-shifting an 8-bit value by two bits§Refer to Table ARM architecture versionsOperation§Assembler S updates Q Action NotesMove Move MOV{cond}{S} Rd, <Oprnd2>N Z C Rd := Oprnd2NOT MVN{cond}{S} Rd, <Oprnd2>N Z C Rd := 0xFFFFFFFF EOR Oprnd2SPSR to register3MRS{cond} Rd, SPSR Rd := SPSRCPSR to register3MRS{cond} Rd, CPSR Rd := CPSRregister to SPSR3MSR{cond} SPSR_<fields>, Rm SPSR := Rm (selected bytes only)register to CPSR3MSR{cond} CPSR_<fields>, Rm CPSR := Rm (selected bytes only)immediate to SPSR3MSR{cond} SPSR_<fields>, #<immed_8r>SPSR := immed_8r (selected bytes only)immediate to CPSR3MSR{cond} CPSR_<fields>, #<immed_8r>CPSR := immed_8r (selected bytes only)Arithmetic Add ADD{cond}{S} Rd, Rn, <Oprnd2>N Z C V Rd := Rn + Oprnd2with carry ADC{cond}{S} Rd, Rn, <Oprnd2>N Z C V Rd := Rn + Oprnd2 + Carrysaturating5E QADD{cond} Rd, Rm, Rn Q Rd := SAT(Rm + Rn)No shift/rotate.double saturating5E QDADD{cond} Rd, Rm, Rn Q Rd := SAT(Rm + SAT(Rn * 2))No shift/rotate.Subtract SUB{cond}{S} Rd, Rn, <Oprnd2>N Z C V Rd := Rn - Oprnd2with carry SBC{cond}{S} Rd, Rn, <Oprnd2>N Z C V Rd := Rn - Oprnd2 - NOT(Carry)reverse subtract RSB{cond}{S} Rd, Rn, <Oprnd2>N Z C V Rd := Oprnd2 - Rnreverse subtract with carry RSC{cond}{S} Rd, Rn, <Oprnd2>N Z C V Rd := Oprnd2 - Rn - NOT(Carry)saturating5E QSUB{cond} Rd, Rm, Rn Q Rd := SAT(Rm - Rn)No shift/rotate.double saturating5E QDSUB{cond} Rd, Rm, Rn Q Rd := SAT(Rm - SAT(Rn * 2))No shift/rotate.Multiply2MUL{cond}{S} Rd, Rm, Rs N Z C*Rd := (Rm * Rs)[31:0]accumulate2MLA{cond}{S} Rd, Rm, Rs, Rn N Z C*Rd := ((Rm * Rs) + Rn)[31:0]unsigned long M UMULL{cond}{S} RdLo, RdHi, Rm, Rs N Z C*V*RdHi,RdLo := unsigned(Rm * Rs)unsigned accumulate long M UMLAL{cond}{S} RdLo, RdHi, Rm, Rs N Z C*V*RdHi,RdLo := unsigned(RdHi,RdLo + Rm * Rs)signed long M SMULL{cond}{S} RdLo, RdHi, Rm, Rs N Z C*V*RdHi,RdLo := signed(Rm * Rs)signed accumulate long M SMLAL{cond}{S} RdLo, RdHi, Rm, Rs N Z C*V*RdHi,RdLo := signed(RdHi,RdLo + Rm * Rs)signed 16 * 16 bit5E SMULxy{cond} Rd, Rm, Rs Rd := Rm[x] * Rs[y]No shift/rotate.signed 32 * 16 bit5E SMULWy{cond} Rd, Rm, Rs Rd := (Rm * Rs[y])[47:16]No shift/rotate.signed accumulate 16 * 165E SMLAxy{cond} Rd, Rm, Rs, Rn Q Rd := Rn + Rm[x] * Rs[y]No shift/rotate.signed accumulate 32 * 165E SMLAWy{cond} Rd, Rm, Rs, Rn Q Rd := Rn + (Rm * Rs[y])[47:16]No shift/rotate.signed accumulate long 16 * 165E SMLALxy{cond} RdLo, RdHi, Rm, Rs RdHi,RdLo := RdHi,RdLo + Rm[x] * Rs[y]No shift/rotate.Count leading zeroes5CLZ{cond} Rd, Rm Rd := number of leading zeroes in RmLogical Test TST{cond} Rn, <Oprnd2>N Z C Update CPSR flags on Rn AND Oprnd2 Test equivalence TEQ{cond} Rn, <Oprnd2>N Z C Update CPSR flags on Rn EOR Oprnd2AND AND{cond}{S} Rd, Rn, <Oprnd2>N Z C Rd := Rn AND Oprnd2EOR EOR{cond}{S} Rd, Rn, <Oprnd2>N Z C Rd := Rn EOR Oprnd2ORR ORR{cond}{S} Rd, Rn, <Oprnd2>N Z C Rd := Rn OR Oprnd2Bit Clear BIC{cond}{S} Rd, Rn, <Oprnd2>N Z C Rd := Rn AND NOT Oprnd2No operation NOP R0 := R0Flags not affected.Shift/Rotate See Table Operand 2. Compare Compare CMP{cond} Rn, <Oprnd2>N Z C V Update CPSR flags on Rn - Oprnd2negative CMN{cond} Rn, <Oprnd2>N Z C V Update CPSR flags on Rn + Oprnd2Vector Floating Point Instruction SetQuick Reference CardKey to Tables{cond}See Table Condition Field (on ARM side).{E} E : raise exception on any NaN. Without E : raise exception only on signaling NaNs.<S/D>S (single precision) or D (double precision).{Z}Round towards zero. Overrides FPSCR rounding mode.<S/D/X>As above, or X (unspecified precision).<VFPregs> A comma separated list of consecutive VFP registers, enclosed in braces ( { and } ).Fd, Fn, Fm Sd, Sn, Sm (single precision), or Dd, Dn, Dm (double precision).<VFPsysreg>FPSCR, or FPSID.Operation Assembler Exceptions Action NotesVector arithmetic Multiply FMUL<S/D>{cond} Fd, Fn, Fm IO, OF, UF, IX Fd := Fn * Fmnegative FNMUL<S/D>{cond} Fd, Fn, Fm IO, OF, UF, IX Fd := - (Fn * Fm)accumulate FMAC<S/D>{cond} Fd, Fn, Fm IO, OF, UF, IX Fd := Fd + (Fn * Fm)deduct FNMAC<S/D>{cond} Fd, Fn, Fm IO, OF, UF, IX Fd := Fd - (Fn * Fm)Exceptionsnegate and accumulate FMSC<S/D>{cond} Fd, Fn, Fm IO, OF, UF, IX Fd := -Fd + (Fn * Fm)IO Invalid operationnegate and deduct FNMSC<S/D>{cond} Fd, Fn, Fm IO, OF, UF, IX Fd := -Fd - (Fn * Fm)OF Overflow Add FADD<S/D>{cond} Fd, Fn, Fm IO, OF, IX Fd := Fn + Fm UF UnderflowSubtract FSUB<S/D>{cond} Fd, Fn, Fm IO, OF, IX Fd := Fn - Fm IX Inexact resultDivide FDIV<S/D>{cond} Fd, Fn, Fm IO, DZ, OF, UF, IX Fd := Fn / Fm DZ Division by zeroCopy FCPY<S/D>{cond} Fd, Fm Fd := FmAbsolute FABS<S/D>{cond} Fd, Fm Fd := abs(Fm)Negative FNEG<S/D>{cond} Fd, Fm Fd := -FmSquare root FSQRT<S/D>{cond} Fd, Fm IO, IX Fd := sqrt(Fm)Scalar compare FCMP{E}<S/D>{cond} Fd, Fm IO Set FPSCR flags on Fd - Fm Use FMSTAT to transfer flags.Compare with zero FCMP{E}Z<S/D>{cond} Fd IO Set FPSCR flags on Fd - 0Use FMSTAT to transfer flags.Scalar convert Single to double FCVTDS{cond} Dd, Sm IO Dd := convertStoD(Sm)Double to single FCVTSD{cond} Sd, Dm IO, OF, UF, IX Sd := convertDtoS(Dm)Unsigned integer to float FUITO<S/D>{cond} Fd, Sm Fd := convertUItoF(Sm)Signed integer to float FSITO<S/D>{cond} Fd, Sm IX Fd := convertSItoF(Sm)Float to unsigned integer FTOUI{Z}<S/D>{cond} Sd, Fm IO, IX Sd := convertFtoUI(Fm)Float to signed integer FTOSI{Z}<S/D>{cond} Sd, Fm IO, IX Sd := convertFtoSI(Fm) Save VFP registers FST<S/D>{cond} Fd, [Rn{, #<immed_8*4>}][address] := FdMultiple, unindexed FSTMIA<S/D/X>{cond} Rn, <VFPregs>Saves list of VFP registers, starting at address in Rn.increment after FSTMIA<S/D/X>{cond} Rn!, <VFPregs>synonym: FSTMEA (empty ascending)decrement before FSTMDB<S/D/X>{cond} Rn!, <VFPregs>synonym: FSTMFD (full descending) Load VFP registers FLD<S/D>{cond} Fd, [Rn{, #<immed_8*4>}]Fd := [address]Multiple, unindexed FLDMIA<S/D/X>{cond} Rn, <VFPregs>Loads list of VFP registers, starting at address in Rn.increment after FLDMIA<S/D/X>{cond} Rn!, <VFPregs>synonym: FLDMFD (full descending)decrement before FLDMDB<S/D/X>{cond} Rn!, <VFPregs>synonym: FLDMEA (empty ascending) Transfer registers ARM to single FMSR{cond} Sn, Rd Sn := RdSingle to ARM FMRS{cond} Rd, Sn Rd := SnARM to lower half of double FMDLR{cond} Dn, Rd Dn[31:0] := Rd Use with FMDHR.Lower half of double to ARM FMRDL{cond} Rd, Dn Rd := Dn[31:0]Use with FMRDH.ARM to upper half of double FMDHR{cond} Dn, Rd Dn[63:32] := Rd Use with FMDLR.Upper half of double to ARM FMRDH{cond} Rd, Dn Rd := Dn[63:32]Use with FMRDL.ARM to VFP system register FMXR{cond} <VFPsysreg>, Rd VFPsysreg := Rd Stalls ARM until all VFP ops complete.VFP system register to ARM FMRX{cond} Rd, <VFPsysreg>Rd := VFPsysreg Stalls ARM until all VFP ops complete.FPSCR flags to CPSR FMSTAT{cond}CPSR flags := FPSCR flags Equivalent to FMRX R15, FPSCRFPSCR format Rounding(Stride - 1)*3Vector length - 1Exception trap enable bits Cumulative exception bits 3130292824232221201817161211109843210 N Z C V FZ RMODE STRIDE LEN IXE UFE OFE DZE IOE IXC UFC OFC DZC IOC FZ: 1 = flush to zero mode.Rounding: 0 = round to nearest, 1 = towards +∞, 2 = towards -∞, 3 = towards zero.(Vector length * Stride) must not exceed 4 for double precision operands.If Fd is S0-S7 or D0-D3, operation is Scalar (regardless of vector length).If Fd is S8-S31 or D4-D15, and Fm is S0-S7 or D0-D3, operation is Mixed (Fm scalar, others vector).If Fd is S8-S31 or D4-D15, and Fm is S8-S31 or D4-D15, operation is Vector.S0-S7 (or D0-D3), S8-S15 (D4-D7), S16-S23 (D8-D11), S24-S31 (D12-D15) each form a circulating bank of registers.All Thumb registers are Lo (R0-R7) except where specified. Hi registers are R8-R15.Operation§Assembler UpdateflagsAction NotesMove Immediate MOV Rd, #<immed_8> Rd := immed_88-bit immediate value.Lo to Lo MOV Rd, Rm Rd := RmHi to Lo, Lo to Hi, Hi to Hi MOV Rd, Rm!Rd := Rm Not Lo to LoArithmetic Add ADD Rd, Rn, #<immed_3> Rd := Rn + immed_33-bit immediate value.Lo and Lo ADD Rd, Rn, Rm Rd := Rn + RmHi to Lo, Lo to Hi, Hi to Hi ADD Rd, Rm!Rd := Rd + Rm Not Lo to Loimmediate ADD Rd, #<immed_8> Rd := Rd + immed_88-bit immediate value.with carry ADC Rd, Rm Rd := Rd + Rm + C-bitvalue to SP ADD SP, #<immed_7*4>!SP := SP + immed_7 * 49-bit immediate value (word-aligned).form address from SP ADD Rd, SP, #<immed_8*4>!Rd := SP + immed_8 * 410-bit immediate value (word-aligned).form address from PC ADD Rd, PC, #<immed_8*4>!Rd := (PC AND 0xFFFFFFFC) + immed_8 * 410-bit immediate value (word-aligned).Subtract SUB Rd, Rn, Rm Rd := Rn - Rmimmediate 3SUB Rd, Rn, #<immed_3> Rd := Rn - immed_33-bit immediate value.immediate 8SUB Rd, #<immed_8> Rd := Rd - immed_88-bit immediate value.with carry SBC Rd, Rm Rd := Rd - Rm - NOT C-bitvalue from SP SUB SP, #<immed_7*4>!SP := SP - immed_7 * 49-bit immediate value (word-aligned).Negate NEG Rd, Rm Rd := - RmMultiply MUL Rd, Rm Rd := Rm * RdCompare CMP Rn, Rm update CPSR flags on Rn - Rm Can be Lo to Lo, Lo to Hi, Hi to Lo, or Hi to Hi.negative CMN Rn, Rm update CPSR flags on Rn + Rmimmediate CMP Rn, #<immed_8> update CPSR flags on Rn - immed_88-bit immediate value.No operation NOP!R8 := R8Flags not affected.Logical AND AND Rd, Rm Rd := Rd AND RmExclusive OR EOR Rd, Rm Rd := Rd EOR RmOR ORR Rd, Rm Rd := Rd OR RmBit clear BIC Rd, Rm Rd := Rd AND NOT RmMove NOT MVN Rd, Rm Rd := NOT RmTest bits TST Rn, Rm update CPSR flags on Rn AND RmShift/rotate Logical shift left LSL Rd, Rm, #<immed_5> Rd := Rm << immed_55-bit immediate shift. Allowed shifts 0-31.LSL Rd, Rs Rd := Rd << RsLogical shift right LSR Rd, Rm, #<immed_5> Rd := Rm >> immed_55-bit immediate shift. Allowed shifts 1-32.LSR Rd, Rs Rd := Rd >> RsArithmetic shift right ASR Rd, Rm, #<immed_5> Rd := Rm ASR immed_55-bit immediate shift. Allowed shifts 1-32.ASR Rd, Rs Rd := Rd ASR RsRotate right ROR Rd, Rs Rd := Rd ROR RsBranch Conditional branch B{cond} label R15 := label label must be within -252 to +258 bytes of current instruction.See Table Condition Field (ARM side). AL not allowed.Unconditional branch B label R15 := label label must be within ±2Kb of current instruction.Long branch with link BL label R14 := R15 - 2, R15 := label Encoded as two Thumb instructions.label must be within ±4Mb of current instruction.Branch and exchange BX Rm R15 := Rm AND 0xFFFFFFFE Change to ARM state if Rm[0] = 0.Branch with link and exchange5T BLX label R14 := R15 - 2, R15 := labelChange to ARM Encoded as two Thumb instructions.label must be within ±4Mb of current instruction.Branch with link and exchange5T BLX Rm R14 := R15 - 2, R15 := Rm AND 0xFFFFFFFEChange to ARM if Rm[0] = 0SoftwareInterruptSWI <immed_8>Software interrupt processor exception8-bit immediate value encoded in instruction. Breakpoint5T BKPT <immed_8>Prefetch abort or enter debug stateENGLANDARM LtdFulbourn RoadCherry HintonCambridge CB1 9JNUKTelephone:+44 1223 400400 Facsimile:+44 1223 400410 Email:info@ GERMANYARM LtdOtto-Hahn Str. 13b85521 Ottobrun-RiemerlingMunichGermanyTelephone:+49 89 608 75545Facsimile:+49 98 608 75599Email:info@USAARM Inc750 University AvenueSuite 150,Los Gatos CA 95032USATelephone:+1 408 579 2207Facsimile:+1 408 579 1205Email:info@JAPANARM KKPlustaria Building 4F,3-1-4 Shinyokohama, Kohoku-ku,Yokohama-shi, 222-0033JapanTelephone:+81 45 477 5260Facsimile:+81 45 477 5261Email:info@KOREAARMRoom #1115, Hyundai Building9-4, Soonae-Dong, Boondang-KuSungnam, Kyunggi-DoKorea 463-020Telephone:+82 342 712 8234Facsimile:+82 342 713 8225Email: info@Operation§Assembler Action NotesLoad with immediate offset, word LDR Rd, [Rn, #<immed_5*4>]Rd := [Rn + immed_5 * 4]halfword LDRH Rd, [Rn, #<immed_5*2>]Rd := ZeroExtend([Rn + immed_5 * 2][15:0])Clears bits 31:16byte LDRB Rd, [Rn, #<immed_5>]Rd := ZeroExtend([Rn + immed_5][7:0])Clears bits 31:8 with register offset, word LDR Rd, [Rn, Rm]Rd := [Rn + Rm]halfword LDRH Rd, [Rn, Rm]Rd := ZeroExtend([Rn + Rm][15:0])Clears bits 31:16signed halfword LDRSH Rd, [Rn, Rm]Rd := SignExtend([Rn + Rm][15:0])Sets bits 31:16 to bit 15byte LDRB Rd, [Rn, Rm]Rd := ZeroExtend([Rn + Rm][7:0])Clears bits 31:8signed byte LDRSB Rd, [Rn, Rm]Rd := SignExtend([Rn + Rm][7:0])Sets bits 31:8 to bit 7 PC-relative LDR Rd, [PC, #<immed_8*4>]Rd := [(PC AND 0xFFFFFFFC) + immed_8 * 4]SP-relative LDR Rd, [SP, #<immed_8*4>]Rd := [SP + immed_8 * 4]Multiple LDMIA Rn!, <reglist>Loads list of registers Always updates base register. Store with immediate offset, word STR Rd, [Rn, #<immed_5*4>][Rn + immed_5 * 4] := Rdhalfword STRH Rd, [Rn, #<immed_5*2>][Rn + immed_5 * 2][15:0] := Rd[15:0]Ignores Rd[31:16]byte STRB Rd, [Rn, #<immed_5>][Rn + immed_5][7:0] := Rd[7:0]Ignores Rd[31:8] with register offset, word STR Rd, [Rn, Rm][Rn + Rm] := Rdhalfword STRH Rd, [Rn, Rm][Rn + Rm][15:0] := Rd[15:0]Ignores Rd[31:16]byte STRB Rd, [Rn, Rm][Rn + Rm][7:0] := Rd[7:0]Ignores Rd[31:8] SP-relative, word STR Rd, [SP, #<immed_8*4>][SP + immed_8 * 4] := RdMultiple STMIA Rn!, <reglist>Stores list of registers Always updates base register.Push/ Pop Push PUSH <reglist>Push registers onto stack Full descending stack. Push with link PUSH <reglist, LR>Push LR and registers onto stackPop POP <reglist>Pop registers from stackPop and return POP <reglist, PC>Pop registers, branch to address loaded to PCPop and return with exchange5T POP <reglist, PC>Pop, branch, and change to ARM state if address[0] = 0Proprietary NoticeARM is the trademark of ARM Ltd.Neither the whole nor any part of the information contained in, or the product described in, this reference card may be adapted or reproduced in any material form except with the prior written permission of the copyright holder.The product described in this reference card is subject to continuous developments and improvements. All particulars of the product and its use contained in this reference card are given by ARM in good faith. However, all warranties implied or expressed, including but not limited to implied warrantiesof merchantability, or fitness for purpose, are excluded.This reference card is intended only to assist the reader in the use of the product. ARM Ltd shall not be liable for any loss or damage arising from the use of any information in this reference card, or any error or omission in such information, or any incorrect use of the product.Document NumberARM QRC 0001DChange LogIssue Date By ChangeA June 1995BJH First ReleaseB Sept 1996BJH Second ReleaseC Nov 1998BJH Third ReleaseD Oct 1999CKS Fourth ReleaseOperation§Assembler Action NotesBranch Branch B{cond} label R15 := label label must be within ±32Mb ofcurrent instruction.with link BL{cond} label R14 := R15-4, R15 := label label must be within ±32Mb ofcurrent instruction.and exchange4T BX{cond} Rm R15 := Rm, Change to Thumb if Rm[0] is 1with link and exchange (1)5T BLX label R14 := R15 - 4, R15 := label, Change to Thumb Cannot be conditional.label must be within ±32Mb ofcurrent instruction.with link and exchange (2)5T BLX{cond} Rm R14 := R15 - 4, R15 := Rm[31:1]Change to Thumb if Rm[0] is 1Load Word LDR{cond} Rd, <a_mode2>Rd := [address]User mode privilege LDR{cond}T Rd, <a_mode2P>branch (and exchange)LDR{cond} R15, <a_mode2>R15 := [address][31:1](§ 5T: Change to Thumb if [address][0] is 1)Byte LDR{cond}B Rd, <a_mode2>Rd := ZeroExtend[byte from address]User mode privilege LDR{cond}BT Rd, <a_mode2P>signed4LDR{cond}SB Rd, <a_mode3>Rd := SignExtend[byte from address]Halfword4LDR{cond}H Rd, <a_mode3>Rd := ZeroExtent[halfword from address]signed4LDR{cond}SH Rd, <a_mode3>Rd := SignExtend[halfword from address]Load multiple Pop, or Block data load LDM{cond}<a_mode4L> Rd{!}, <reglist-pc>Load list of registers from [Rd]return (and exchange)LDM{cond}<a_mode4L> Rd{!}, <reglist+pc>Load registers, R15 := [address][31:1](§ 5T: Change to Thumb if [address][0] is 1)Use from exception modes only.and restore CPSR LDM{cond}<a_mode4L> Rd{!}, <reglist+pc>^Load registers, branch (§ 5T: and exchange),CPSR := SPSRUser mode registers LDM{cond}<a_mode4L> Rd, <reglist-pc>^Load list of User mode registers from [Rd]Use from privileged modes only. Store Word STR{cond} Rd, <a_mode2>[address] := RdUser mode privilege STR{cond}T Rd, <a_mode2P>[address] := RdByte STR{cond}B Rd, <a_mode2>[address][7:0] := Rd[7:0]User mode privilege STR{cond}BT Rd, <a_mode2P>[address][7:0] := Rd[7:0]Halfword4STR{cond}H Rd, <a_mode3>[address][15:0] := Rd[15:0]Store multiple Push, or Block data store STM{cond}<a_mode4S> Rd{!}, <reglist>Store list of registers to [Rd]User mode registers STM{cond}<a_mode4S> Rd{!}, <reglist>^Store list of User mode registers to [Rd]Use from privileged modes only. Swap Word3SWP{cond} Rd, Rm, [Rn]temp := [Rn], [Rn] := Rm, Rd := tempByte3SWP{cond}B Rd, Rm, [Rn]temp := ZeroExtend([Rn][7:0]),[Rn][7:0] := Rm[7:0], Rd := tempCoprocessors Data operations2CDP{cond} p<cpnum>, <op1>, CRd, CRn, CRm, <op2>Coprocessor defined5CDP2 p<cpnum>, <op1>, CRd, CRn, CRm, <op2>Cannot be conditional.Move to ARM reg from coproc2MRC{cond} p<cpnum>, <op1>, Rd, CRn, CRm, <op2>5MRC2 p<cpnum>, <op1>, Rd, CRn, CRm, <op2>Cannot be conditional.Move to coproc from ARM reg2MCR{cond} p<cpnum>, <op1>, Rd, CRn, CRm, <op2>5MCR2 p<cpnum>, <op1>, Rd, CRn, CRm, <op2>Cannot be conditional.Load2LDC{cond} p<cpnum>, CRd, <a_mode5>5LDC2 p<cpnum>, CRd, <a_mode5>Cannot be conditional.Store2STC{cond} p<cpnum>, CRd, <a_mode5>5STC2 p<cpnum>, CRd, <a_mode5>Cannot be conditional.SWI{cond} <immed_24>Software interrupt processor exception24-bit value encoded in instruction. SoftwareinterruptBreakpoint5BKPT <immed_16>Prefetch abort or enter debug state Cannot be conditional.ARM Addressing ModesQuick Reference CardAddressing Mode 2 - Word and Unsigned Byte Data Transfer ARM architecture versionsPre-indexed Immediate offset[Rn, #+/-<immed_12>]{!}n ARM architecture version n and above.Zero offset[Rn]Equivalent to [Rn,#0]n T T variants of ARM architecture version n and above.Register offset[Rn, +/-Rm]{!}M ARM architecture version 3M, and 4 and above excluding xM variantsScaled register offset[Rn, +/-Rm, LSL #<immed_5>]{!}Allowed shifts 0-31n E E variants of ARM architecture version n and above.[Rn, +/-Rm, LSR #<immed_5>]{!}Allowed shifts 1-32[Rn, +/-Rm, ASR #<immed_5>]{!}Allowed shifts 1-32[Rn, +/-Rm, ROR #<immed_5>]{!}Allowed shifts 1-31Operand 2[Rn, +/-Rm, RRX]{!}Immediate value#<immed_8r>Post-indexed Immediate offset[Rn], #+/-<immed_12>Logical shift left immediate Rm, LSL #<immed_5>Allowed shifts 0-31 Register offset[Rn], +/-Rm Logical shift right immediate Rm, LSR #<immed_5>Allowed shifts 1-32Scaled register offset[Rn], +/-Rm, LSL #<immed_5>Allowed shifts 0-31Arithmetic shift right immediate Rm, ASR #<immed_5>Allowed shifts 1-32 [Rn], +/-Rm, LSR #<immed_5>Allowed shifts 1-32Rotate right immediate Rm, ROR #<immed_5>Allowed shifts 1-31[Rn], +/-Rm, ASR #<immed_5>Allowed shifts 1-32Register Rm[Rn], +/-Rm, ROR #<immed_5>Allowed shifts 1-31Rotate right extended Rm, RRX[Rn], +/-Rm, RRX Logical shift left register Rm, LSL RsLogical shift right register Rm, LSR RsAddressing Mode 2 (Post-indexed only)Arithmetic shift right register Rm, ASR RsPost-indexed Immediate offset[Rn], #+/-<immed_12>Rotate right register Rm, ROR RsZero offset[Rn]Equivalent to [Rn],#0Register offset[Rn], +/-RmScaled register offset[Rn], +/-Rm, LSL #<immed_5>Allowed shifts 0-31PSR fields(use at least one suffix)[Rn], +/-Rm, LSR #<immed_5>Allowed shifts 1-32Suffix Meaning[Rn], +/-Rm, ASR #<immed_5>Allowed shifts 1-32c Control field mask byte PSR[7:0][Rn], +/-Rm, ROR #<immed_5>Allowed shifts 1-31f Flags field mask byte PSR[31:24][Rn], +/-Rm, RRX s Status field mask byte PSR[23:16]x Extension field mask byte PSR[15:8]Addressing Mode 3 - Halfword and Signed Byte Data TransferPre-indexed Immediateoffset[Rn, #+/-<immed_8>]{!}Zero offset[Rn]Equivalent to [Rn,#0]Condition Field {cond}Register[Rn, +/-Rm]{!}Mnemonic Description Description (VFP)Post-indexed Immediate offset[Rn], #+/-<immed_8>EQ Equal Equal Register[Rn], +/-Rm NE Not equal Not equal, or unorderedCS / HS Carry Set / Unsigned higher or same Greater than or equal, or unordered Addressing Mode 4 - Multiple Data Transfer CC / LO Carry Clear / Unsigned lower Less thanBlock load Stack pop MI Negative Less thanIA Increment After FD Full Descending PL Positive or zero Greater than or equal, or unordered IB Increment Before ED Empty Descending VS Overflow Unordered (at least one NaN operand) DA Decrement After FA Full Ascending VC No overflow Not unorderedDB Decrement Before EA Empty Ascending HI Unsigned higher Greater than, or unorderedLS Unsigned lower or same Less than or equal Block store Stack push GE Signed greater than or equal Greater than or equalIA Increment After EA Empty Ascending LT Signed less than Less than, or unorderedIB Increment Before FA Full Ascending GT Signed greater than Greater thanDA Decrement After ED Empty Descending LE Signed less than or equal Less than or equal, or unordered DB Decrement Before FD Full Descending AL Always (normally omitted)Always (normally omitted)Addressing Mode 5 - Coprocessor Data TransferPre-indexed Immediate offset[Rn, #+/-<immed_8*4>]{!}Key to tablesZero offset[Rn]Equivalent to [Rn,#0]{!}Updates base register after data transfer if ! present. (Post-indexed always updates.) Post-indexed Immediate offset[Rn], #+/-<immed_8*4><immed_8r> A 32-bit constant, formed by right-rotating an 8-bit value by an even number of bits. Unindexed No offset[Rn], {8-bit copro. option}+/-+ or -. (+ may be omitted.)。
C Standard Library 参考手册说明书

About the T utorialC is a general-purpose, procedural, imperative computer programming language developed in 1972 by Dennis M. Ritchie at the Bell Telephone Laboratories to develop the Unix operating system.C is the most widely used computer language that keeps fluctuating at number one scale of popularity along with Java programming language which is also equally popular and most widely used among modern software programmers.The C Standard Library is a set of C built-in functions, constants and header files like <assert.h>, <ctype.h>,etc. This library will work as a reference manual for C programmers.AudienceThe C Standard Library is a reference for C programmers to help them in their projects related to system programming. All the C functions have been explained in a user-friendly way and they can be copied and pasted in your C projects.PrerequisitesA basic understanding of the C Programming language will help you in understanding the C built-in functions covered in this library.Copyright & DisclaimerCopyright 2014 by Tutorials Point (I) Pvt. Ltd.All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish any contents or a part of contents of this e-book in any manner without written consent of the publisher.We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our website or its contents including this tutorial. If you discover any errors on our website or inthistutorial,******************************************T able of ContentsAbout the Tutorial (i)Audience (i)Prerequisites (i)Copyright & Disclaimer (i)Table of Contents .................................................................................................................................... i i 1. C LIBRARY ─ <ASSERT.H> .. (1)Introduction (1)Library Macros (1)2. C LI BRARY ─ <CTYPE.H> (3)Introduction (3)Library Functions (3)Character Classes (24)3. C LIBRARY ─ <ERRNO.H> (26)Introduction (26)Library Macros (26)4. C LIBRARY ─ <FLOAT.H> (31)Introduction (31)Library Macros (31)5. C LIBRARY ─ <LIMITS.H> (34)Introduction (34)Library Macros (34)6. C LIBRARY ─ <LOCALE.H> (37)Introduction (37)Library Macros (37)Library Functions (38)Library Structure (42)7. C LIBRARY ─ <MATH.H> (45)Introduction (45)Library Macros (45)Library Functions (45)8. C LIBRARY ─ <SETJMP.H> (68)Introduction (68)Library Variables (68)Library Macros (68)Library Functions (70)9. C LIBRARY ─ <SIGNA L.H> (72)Introduction (72)Library Variables (72)Library Macros (72)Library Functions (73)10. C LIBRARY ─ <STDARG.H> (78)Introduction (78)Library Variables (78)Library Macros (78)11. C LIBRARY ─ <STDDEF.H> (83)Introduction (83)Library Variables (83)Library Macros (83)12. C LIBRARY ─ <STDIO.H> (87)Introduction (87)Library Variables (87)Library Macros (87)Library Functions (88)13. C LIBRARY ─ <STDLIB.H> (167)Introduction (167)Library Variables (167)Library Macros (167)Library Functions (168)14. C LIBRARY ─ <STRING.H> (205)Introduction (205)Library Variables (205)Library Macros (205)Library Functions (205)15. C LIBRARY ─ <TIME.H> (233)Introduction (233)Library Variables (233)Library Macros (234)Library Functions (234)C Standard Library 5IntroductionThe assert.h header file of the C Standard Library provides a macro called assert which can be used to verify assumptions made by the program and print a diagnostic message if this assumption is false.The defined macro assert refers to another macro NDEBUG which is not a part of <assert.h>. If NDEBUG is defined as a macro name in the source file, at the point where <assert.h> is included, the assert macro is defined as follows:Library MacrosFollowing is the only function defined in the header assert.h:void assert(int expression)DescriptionThe C library macro void assert(int expression) allows diagnostic information to be written to the standard error file. In other words, it can be used to add diagnostics in your C program. DeclarationFollowing is the declaration for assert() Macro.Parametersexpression -- This can be a variable or any C expression. If expression evaluates to TRUE, assert() does nothing. If expression evaluates to FALSE, assert() displays an1.C Standard Library6error message on stderr(standard error stream to display error messages and diagnostics) and aborts program execution.Return ValueThis macro does not return any value.ExampleThe following example shows the usage of assert() macro:Let us compile and run the above program in the interactive mode as shown below:C Standard Library 7IntroductionThe ctype.h header file of the C Standard Library declares several functions that are useful for testing and mapping characters.All the functions accepts int as a parameter, whose value must be EOF or representable as an unsigned char.All the functions return non-zero (true) if the argument c satisfies the condition described, and zero (false) if not.Library FunctionsFollowing are the functions defined in the header ctype.h:2.int isalnum(int c)DescriptionThe C library function void isalnum(int c)checks if the passed character is alphanumeric. DeclarationFollowing is the declaration for isalnum() function.Parametersc-- This is the character to be checked.Return ValueThis function returns non-zero value if c is a digit or a letter, else it returns 0.ExampleThe following example shows the usage of isalnum() function.9Let us compile and run the above program to produce the following result:int isalpha(int c)DescriptionThe C library function void isalpha(int c)checks if the passed character is alphabetic. DeclarationFollowing is the declaration for isalpha() function.Parametersc-- This is the character to be checked.Return ValueThis function returns non-zero value if c is an alphabet, else it returns 0.ExampleThe following example shows the usage of isalpha() function.11Let us compile and run the above program to produce the following result: int iscntrl(int c)DescriptionThe C library function void iscntrl(int c) checks if the passed character is a control character. According to standard ASCII character set, control characters are between ASCII codes 0x00 (NUL), 0x1f (US), and 0x7f (DEL). Specific compiler implementations for certain platforms may define additional control characters in the extended character set (above 0x7f).DeclarationFollowing is the declaration for iscntrl() function. Parametersc -- This is the character to be checked.Return ValueThis function returns non-zero value if c is a control character, else it returns 0.ExampleThe following example shows the usage of iscntrl() function.13Let us compile and run the above program to produce the following result:int isdigit(int c)DescriptionThe C library function void isdigit(int c)checks if the passed character is a decimal digit character.Decimal digits are (numbers): 0 1 2 3 4 5 6 7 8 9.14DeclarationFollowing is the declaration for isdigit() function.Parametersc-- This is the character to be checked.Return ValueThis function returns non-zero value if c is a digit, else it returns 0. ExampleThe following example shows the usage of isdigit() function.Let us compile and run the above program to produce the following result: int isgraph(int c)DescriptionThe C library function void isgraph(int c) checks if the character has graphical representation.The characters with graphical representations are all those characters that can be printed except for whitespace characters (like ' '), which is not considered as isgraph characters.DeclarationFollowing is the declaration for isgraph() function. Parametersc -- This is the character to be checked.Return ValueThis function returns non-zero value if c has a graphical representation as character, else it returns 0.ExampleThe following example shows the usage of isgraph() function.16Let us compile and run the above program to produce the following result:17int islower(int c)DescriptionThe C library function int islower(int c)checks whether the passed character is a lowercase letter.DeclarationFollowing is the declaration for islower() function.Parametersc-- This is the character to be checked.Return ValueThis function returns a non-zero value(true) if c is a lowercase alphabetic letter else, zero (false).ExampleThe following example shows the usage of islower() function.18Let us compile and run the above program to produce the following result: int isprint(int c)DescriptionThe C library function int isprint(int c) checks whether the passed character is printable. A printable character is a character that is not a control character.DeclarationFollowing is the declaration for isprint() function. Parametersc -- This is the character to be checked.19Return ValueThis function returns a non-zero value(true) if c is a printable character else, zero (false). ExampleThe following example shows the usage of isprint() function.20Let us compile and run the above program to produce the following result:int ispunct(int c)DescriptionThe C library function int ispunct(int c) checks whether the passed character is a punctuation character. A punctuation character is any graphic character (as in isgraph) that is not alphanumeric (as in isalnum).DeclarationFollowing is the declaration for ispunct() function.Parameters21c-- This is the character to be checked.Return ValueThis function returns a non-zero value(true) if c is a punctuation character else, zero (false). ExampleThe following example shows the usage of ispunct() function.22Let us compile and run the above program that will produce the following result:int isspace(int c)DescriptionThe C library function int isspace(int c) checks whether the passed character is white-space. Standard white-space characters are:23DeclarationFollowing is the declaration for isspace() function.Parametersc -- This is the character to be checked.Return ValueThis function returns a non-zero value(true) if c is a white-space character else, zero (false).24End of ebook previewIf you liked what you saw…Buy it from our store @ https://。
c语言中的引用
public:
Set () {card=0;} //构造函数
friend Set operator * (Set ,Set ) ; //重载运算符号*,用于计算集合的交集 用对象作为传值参数
// friend Set operator * (Set & ,Set & ) 重载运算符号*,用于计算集合的交集 用对象的引用作为传值参数
当大型对象被传递给函数时,使用引用参数可使参数传递效率得到提高,因为引用并不产生对象的
副本,也就是参数传递时,对象无须复制。下面的例子定义了一个有限整数集合的类:
const maxCard=100;
Class Set
{
int elems[maxCard]最大值。
void swapint(int &a,int &b)
{
int temp;
temp=a;
a=b;
b=temp;
}
调用该函数的c++方法为:swapint(x,y); c++自动把x,y的地址作为参数传递给swapint函数。
2、给函数传递大型对象
{
res.elems[res.card++]=Set1.elems;
break;
}
return res;
}
由于重载运算符不能对指针单独操作,我们必须把运算数声明为 Set 类型而不是 Set * 。
每次使用*做交集运算时,整个集合都被复制,这样效率很低。我们可以用引用来避免这种情况。
c语言中的引用2009-02-09 13:00
C语言常见基本词汇及词汇解释
C语言常用基本词汇及其他提示语运算符与表达式:1.constant 常量2. variable 变量3. identify 标识符4. keywords 关键字5. sign 符号6. operator 运算符7. statement语句8. syntax 语法9. expression 表达式10. initialition 初始化11. number format 数据格式12 declaration 说明13. type conversion 类型转换14.define 、definition 定义条件语句:1.select 选择2. expression 表达式3. logical expression 逻辑表达式4. Relational expression 关系表达式5.priority优先6. operation运算7.structure 结构循环语句:1.circle 循环2. condition 条件3. variant 变量4. process过程5.priority优先6. operation运算数组:1. array 数组2. reference 引用3. element 元素4. address 地址5. sort 排序6. character 字符7. string 字符串8. application 应用函数:1.call 调用2.return value 返回值3.function 函数4. declare 声明5. `parameter 参数6.static 静态的7.extern 外部的指针:1. pointer 指针2. argument 参数3. array 数组4. declaration 声明5. represent 表示6. manipulate 处理结构体、共用体、链表:1 structure 结构2 member成员3 tag 标记4 function 函数5 enumerate 枚举6 union 联合(共用体)7 create 创建8 insert 插入9 delete 删除10 modify 修改文件:1、file 文件2、open 打开3、close 关闭4、read 读5、write 写6、error 错误序号主要章节常用英汉对照词汇备注1 运算符与表达式(operator and expression )汉语英语常量constant变量variable标识符identify关键字keywords符号sign运算符operator语句statement语法syntax表达式Expression初始化Initialization数据格式number format说明Declaration类型转换type conversion定义Define 、definition2 条件语句(conditionstatement) 选择select表达式expression逻辑表达式logical expression关系表达式Relational expression 优先priority运算operation结构structure3 循环语句(circle statement) 循环circle条件condition变量variant过程process优先priority运算operation4 函数(function) 调用call返回值return value函数function声明declare参数parameter静态的static外部的extern5 数组和指针(array and pointer) 数组array 引用reference元素element地址address排序sort字符character字符串string应用application指针pointer参数argument数组array声明declaration表示represent处理manipulate6 结构体、共用体(structures 、union )结构structure 成员member标记tag函数function枚举enumerate联合( 共用体) union创建create插入insert删除delete修改modify7 文件(file) 文件file打开open关闭close读read写write错误errorProgram Design 程序设计writing program 编写程序standardize vt.使标准化coding the program 编程simplify vt.单一化,简单化programming 程序revision n.校订,修正programmer n.程序员occupy vt.占领,住进logic n.逻辑,逻辑学BASIC 初学者通用符号指令代码machine code 机器代码teaching language 教学语言debug n.DOS命令,调试simplicity n.单纯,简朴compactness a.紧凑的,紧密的timesharing system 分时系统description n.描述,说明interactive language 交互式语言break n.中断manufacturer n.制造业者structure chart 结构图dialect n.方言,语调the program flow 程序流expense n.费用,代价manager module 管理模块uniformity n.同样,划一worder module 工作模块archaic a.己废的,古老的mainmodule 主模块sufficient a.充分的,足够的submodule 子模块data processing 数据处理modify v.修正,修改business application 商业应用outline n.轮廓,概要scientific application 科学应用compose分解lexical a.字典的,词汇的code 代码non-programmer n.非编程人员node vt改为密码notation n.记号法,表示法,注释pseudocode n.伪代码verbosity n.唠叨,冗长commas n.逗点逗号record n.记录documentation 文档subrecord n.子记录flowchart/flow 程表/流程data division 数据部visual a.视觉的procedure division 过程部represent vt.表现,表示,代表comprise vt.包含构成structured techniques结构化技术operator n.运算符,算子straightforward a.笔直的,率直的commercial package 商业软件包subroutine n.子程序generator n.产生器,生产者driver module 驱动模块mathematician n.专家line by line 逐行operator n.作符translate vt.翻译,解释forerunner n.先驱modular 摸块化ancestor n.祖宗cumbersome a.讨厌的,麻烦的teaching programming 编程教学lengthy a.冗长的,漫长的alter vi./vt.改变flaw n.缺点裂纹devclop vt.发达separate a.各别的recompile v.编译assist n.帮助cycle n.循环technician n.技师remove vt.移动,除去straight line 直线category n.种类,类项rectangle n.长方形,矩形P-code p代码virtrally ad.事实上symology n.象征学象征的使用register n.寄存器to summaries 总之,总而言之by convention 按照惯例cyptic n.含义模糊的,隐藏的diamond-shaped a,菱形的bracket n.括号decision n判断obviate 除去,排除terminal n. a终端机,终端的keyword n.关键字card reader 阅读器underline vt.下划线translator program 译程序monadic a. monad(单位)的Programming 程序设计dec/binary n.二进制source language 源语shift 变化,转移,移位machine language 机器overflow n.溢出machine instruction 机器指令arithmetic n.算术,算法computer language 计算机语composite symbol 复合型符号.assembly language 汇编语assignment n.赋值floating point number浮点数proliferation n.增服high-level language高级语pointer n.指针natural language 自然语言array n.数组矩阵,source text 源文本subscript n.下标intermediate language 中间语言type conversion 类型转换software development 软件开发address arithmetic 地址运算map vt.映射,计划denote vt.指示,表示maintenance cost 维护费用subprogram n.子程序legibility n.易读性,易识别separate compilation 分离式编泽amend vt.修正,改善alphabetic a.照字母次序的consumer n.消费者digit n.数字位数enormous a.巨大的,庞大的numeric expression 数值表达式reliability n.可信赖性,可信度tap n.轻打,轻敲,选择safety n.安全,安全设备print zone 打印区property n.财产,所有权column n.列correctness n.正确,functionality n.机能semicolon n.分号portable a.叮携带的,可搬运的survey n.概观.altoggle n.肘节开关task n.作,任务declaration n.宣告说明source program 源程序mufti-dimension array 多维数组object program 目标程序其他提示语:CPU(Center Processor Unit)中央处理单元mainboard主板RAM(random accessmemory)随机存储器(内存)ROM(Read Only Memory)只读存储器Floppy Disk软盘Hard Disk硬盘CD-ROM光盘驱动器(光驱)monitor监视器keyboard键盘mouse鼠标chip芯片CD-R光盘刻录机HUB集线器Modem= MOdulator-DEModulator,调制解调器P-P(Plug and Play)即插即用UPS(Uninterruptable Power Supply)不间断电源BIOS(Basic-input-OutputSystem)基本输入输出系统CMOS(Complementary Metal-Oxide-Semiconductor)互补金属氧化物半导体setup安装uninstall卸载wizzard向导OS(Operation Systrem)操作系统OA(Office AutoMation)办公自动化exit退出edit编辑copy复制cut剪切paste粘贴delete删除select选择find查找select all全选replace替换undo撤消redo重做program程序license许可(证)back前一步next下一步finish结束folder文件夹Destination Folder目的文件夹user用户click点击double click双击right click右击settings设置update更新release发布data数据data base数据库DBMS(Data Base Manege System)数据库管理系统view视图insert插入object对象configuration配置command命令document文档POST(power-on-self-test)电源自检程序cursor光标attribute属性icon图标service pack服务补丁option pack功能补丁Demo演示short cut快捷方式exception异常debug调试previous前一个column行row列restart重新启动text文本font字体size大小scale比例interface界面function函数access访问manual指南active激活computer language计算机语言menu菜单GUI(graphical user interfaces )图形用户界面template模版page setup页面设置password口令code密码print preview打印预览zoom in放大zoom out缩小pan漫游cruise漫游full screen全屏tool bar工具条status bar状态条ruler标尺table表paragraph段落symbol符号style风格execute执行graphics图形image图像Unix用于服务器的一种操作系统Mac OS苹果公司开发的操作系统OO(Object-Oriented)面向对象virus病毒file文件open打开colse关闭new新建save保存exit退出clear清除default默认LAN局域网WAN广域网Client/Server客户机/服务器ATM( AsynchronousTransfer Mode)异步传输模式Windows NT微软公司的网络操作系统Internet互联网WWW(World Wide Web)万维网protocol协议HTTP超文本传输协议FTP文件传输协议Browser浏览器homepage主页Webpage网页website网站URL在Internet的WWW服务程序上用于指定信息位置的表示方法Online在线Email电子邮件ICQ网上寻呼Firewall防火墙Gateway网关HTML超文本标识语言hypertext超文本hyperlink超级链接IP(Address)互联网协议(地址)SearchEngine搜索引擎TCP/IP用于网络的一组通讯协议Telnet远程登录IE(Internet Explorer)探索者(微软公司的网络浏览器) Navigator引航者(网景公司的浏览器)multimedia多媒体ISO国际标准化组织ANSI美国国家标准协会able 能activefile 活动文件addwatch 添加监视点allfiles 所有文件allrightsreserved 所有的权力保留altdirlst 切换目录格式andfixamuchwiderrangeofdiskproblems 并能够解决更大范围内的磁盘问题andotherinFORMation 以及其它的信息archivefileattribute 归档文件属性assignto 指定到autoanswer 自动应答autodetect 自动检测autoindent 自动缩进autosave 自动存储availableonvolume 该盘剩余空间badcommand 命令错badcommandorfilename 命令或文件名错batchparameters 批处理参数binaryfile 二进制文件binaryfiles 二进制文件borlandinternational borland国际公司bottommargin 页下空白bydate 按日期byextension 按扩展名byname 按名称bytesfree 字节空闲callstack 调用栈casesensitive 区分大小写causespromptingtoconfirmyouwanttooverwritean 要求出现确认提示,在你想覆盖一个centralpointsoftwareinc central point 软件股份公司changedirectory 更换目录changedrive 改变驱动器changename 更改名称characterset 字符集checkingfor 正在检查checksadiskanddisplaysastatusreport 检查磁盘并显示一个状态报告chgdrivepath 改变盘/路径node 节点npasswd UNIX的一种代理密码检查器,在提交给密码文件前,它将对潜在的密码进行筛选。
C语言版读卡器详细设计
饭店英语unit12
Introduction
Credit cards or Cash
Many guests prefer to carry their money in the form of traveler’s checks because these are safer than cash. If the guest loses them, or if they are stolen, he can get his money back. Traveler’s checks have other advantages. They can be bought in different kinds of currency, so the guest does not have to worry about the changing of the exchange rates.
IV Topic Extension
(Two minutes later)
W: Here is your card, and your receipt. Could you sign here? G: Ok. (Mr. Green takes out 50 Yuan ) That’s my tip for you. W: That’s very kind of you, sir. But we don’t accept tips. It’s against
Mr. Gray invites some friends to have dinner in Rose Restaurant. When they finish the meal, Mr. Gray calls the waitress.
G: Waitress! W: Yes, sir. Would you like anything else? G: No, thank you. Can I have my bill, please? W: Yes, sir. Here it is. G: How much is it? W: Your bill comes to US$ 52.
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
unsigned
0 to 65,535
long 4 signed -2,147,483,648 to
2,147,483,647
unsigned 0 - 4,294,967,295
int
varies depending on system
float 4 3.4E +/- 38 (7 digits)
double 8 1.7E +/- 308 (15 digits)
void * // generic pointer type
NULL; // null pointer
*ptr; // object pointed to by pointer
&obj // address of object Arrays
int arry[n];
// array of size n
type id;
// declaration
type id,id,id; // multiple declaration
type *id;
// pointer declaration
type id = value; // declare with assign
type *id = value; // pointer with assign
User Defined DataTypes
typedef existingtype newtypename; typedef unsigned int WORD; enum name{val1, val2, ...} obj_name; enum days_t {MON,WED,FRI} days; union model_name {
Preprocessor Directives
#define ID value // replaces ID with
//value for each occurrence in the code
#undef ID // reverse of #define
#ifdef ID //executes code if ID defined
// code in case of exception statements; }
Operators
priority/operator/desc/ASSOCIATIVITY
1 :: scope LEFT 2 () parenthesis LEFT
[ ] brackets LEFT -> pointer reference LEFT . structure member access LEFT sizeof returns memory size LEFT 3 ++ increment RIGHT —- decrement RIGHT ~ complement to one (bitwise) RIGHT ! unary NOT RIGHT & reference (pointers) RIGHT * dereference RIGHT (type) type casting RIGHT + - unary less sign RIGHT 4 * multiply LEFT / divide LEFT % modulus LEFT 5 + addition LEFT - subtraction LEFT 6 << bitwise shift left LEFT >> bitwise shift right LEFT 7 < less than LEFT <= less than or equal LEFT > greater than LEFT >= greater than or equal LEFT 8 == equal LEFT != not equal LEFT 9 & bitwise AND LEFT ^ bitwise NOT LEFT | bitwise OR LEFT 10 && logical AND LEFT || logical OR LEFT 11 ? : conditional RIGHT 12 = assignment += add/assign -= subtract/assign *= multiply/assign /= divide/assign %= modulus/assign >>= bitwise shift right/assign <<= bitwise shift left/assign &= bitwise AND/assign ^= bitwise NOT/assign |= bitwise OR/assign 13 , comma
Data Types
Variable Declaration
special class size sign type name;
special: volatile
class: register, static, extern, auto
size: long, short, double
sign: signed, unsigned type: int, float, char (required) name: the variable name (required)
float f = 4.0E10; // 4^10
int ary[2] = {1,2}// array of ints
const int a = 45; // constant declaration
struct products { // declaration
char name[30];
float price;
comment */
Identifiers
These are ANSI C++ reserved words and cannot be used as variable names.
asm, auto, bool, break, case, catch, char, class, const, const_cast, continue, default, delete, do, double, dynamic_cast, else, enum, explicit, extern, false, float, for, friend, goto, if, inline, int, long, mutable, namespace, new, operator, private, protected, public, register, reinterpret_cast, return, short, signed, sizeof, static, static_cast, struct, switch, template, this, throw, true, try, typedef, typeid, typename, union, unsigned, using, virtual, void, volatile, wchar_t
#pragma //passes parameters to compiler
Control Structures
Decision (if-else)
type1 element1; type2 element2; ... } object_name; union mytypes_t { char c; int i; } mytypes; struct packed { // bit fields unsigned int flagA:1; // flagA is 1 bit unsigned int flagB:3; // flagB is 3 bit }
// example of variable declaration
extern short unsigned char AFlag;
TYPE SIZE
RANGE
char 1 signed -128 to 127
unsigned 0 to 255
short 2 signed -32,768 to 32,767来自long double
10 1.2E +/- 4,932 (19 digits)
bool 1 true or false
wchar_t 2 wide characters Pointers
type *variable; // pointer to variable
type *func(); // function returns pointer
int arry2d[n][m]; // 2d n x m array
int arry3d[i][j][k]; // 3d i x j x k array Structures
struct name {
type1 element1;
type2 element2;
...
} object_name; // instance of name
#ifndef ID // opposite of #ifdef
#if expr // executes if expr is true
#else
// else
#elif
// else if
#endif
// ends if block
#line number “filename”
// #line controls what line number and
pApple->price = 0.35; // assignment
Exceptions
try { // code to be tried... if statements statements; // fail, exception is set throw exception;