Binary-Number-Output-Electrical-and-Computer-Engineering二进制数输出的电气和计算机工程课件.ppt
- 【下载声明】
1. 本站全部试题类文档,若标题没写含答案,则无答案;标题注明含答案的文档,主观题也可能无答案。请谨慎下单,一旦售出,不予退换。
2. 本站全部PPT文档均不含视频和音频,PPT中出现的音频或视频标识(或文字)仅表示流程,实际无音频或视频文件。请谨慎下单,一旦售出,不予退换。
3. 本页资料《Binary-Number-Output-Electrical-and-Computer-Engineering二进制数输出的电气和计算机工程课件.ppt》由用户(三亚风情)主动上传,其收益全归该用户。163文库仅提供信息存储空间,仅对该用户上传内容的表现方式做保护处理,对上传内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(点击联系客服),我们立即给予删除!
4. 请根据预览情况,自愿下载本文。本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
5. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007及以上版本和PDF阅读器,压缩文件请下载最新的WinRAR软件解压。
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Binary Number Output Electrical and Computer Engineering 二进制 输出 电气 计算机 工程 课件
- 资源描述:
-
1、Binary Number Output To display a number in binary format, a program looks at each bit in the number and sends the ASCII equivalent of a 1 (31h) or a 0 (30h) to the screen using the DOS single character Int 21h function 2. The 8-bit value E6h (1110 0110) would have 31h,31h,31h,30h,30h,31h,31h,30h He
2、x Number Output To display the 8-bit value E6h as a HEX number, the ASCII codes for E(45h) and 6(36h) would be sent using Int 21h, function 2.Procedure to Display Hex DigitInput: AL Clear upper 4-bits of AL (should only have values 0-F) Check AL for 0-9 (CMP AL,9) (Add AL,30h if 0-9) Must be Char if
3、 above 9 (Add AL, 37h if char; 37h + 10d = 41h(A) Use Int21h, function 2 to display char (DL holds char)Procedure to Display 1 Hex DigitInput: ALOut1hexprocAndal,0fh ;only want lower 4 bits of ALCmpal,9 ;is 4 bit value above 9?JaischarAddal,30h ;convert to ascii digit 0 to 9JmpprintitIschar: addal,3
4、7h ;convert to ascii digit A to FPrintit: Movdl,alMovah,2Int21h ;print it using DOS single char outputRetOut1hexendpProcedure for CRLF Use Int 21h, function 2 to display ASCII values for CR (0Dh), LF (0Ah).Pcrlfproc;print carriage return/line feedMovdl,0Dh ;carriage returnMovah,2;function # goes int
5、o AHInt21h;print itMovdl,0Ah ;line feedMovah,2;function #Int21hRetPcrlfendpIrvine Library Procedures Writeint writes an unsigned 16-bit integer to standard output in ASCII binary, decimal, octal, or hexadecimal format. Input: AX=integer, BX=radix(2,8,10,or 16) Writeint_signed writes a 16-bit integer
6、 to standard output in signed decimal ASCII format. Input: AX=integer.Irvine Library Procedures Writelong - writes an unsigned 32-bit integer to standard output in ASCII binary, decimal, octal, or hexadecimal format. Input: EAX=integer, BX=radix(2,8,10,or 16) Writebcd writes an 8-bit binary coded de
7、cimal byte to standard output. Input: AL=byte. Crlf Writes a carriage return and line feed to standard output.Irvine Library Procedures Clrscr Clears the screen and locates the cursor at the upper left corner. No input. Works only on video page 0, and only in text mode. Writestring Writes a null ter
8、minated string to standard output. Input: DX points to the string. Readint Reads a signed ASCII decimal string from standard input and stores it as a 16-bit binary integer. Input: none. Output: AX contains the value.Changing Model Size Using a small model size requires that procedures must be within
展开阅读全文
链接地址:https://www.163wenku.com/p-2477228.html