WA4 - ; ; PackedToAsc PROC ; ; ; Receives: EAX = binary...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
TITLE Program with packed decimal to asc (main.asm) ( INCLUDE Irvine32.inc I .data . ;pack1 DWORD 42349673h ; ;pack1 DWORD 23456733h ; pack1 DWORD 67234873h p buffer BYTE 16 dup(0),0 b mymsg BYTE 'This is a Packed to ASCII output.' m .code . main PROC m mov eax,pack1 mov esi,OFFSET buffer mov edx,OFFSET mymsg call WriteString call Crlf call PackedToAsc mov edx,OFFSET buffer call WriteString call Crlf exit main ENDP m ;---------------------------------------------------------
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ; ; PackedToAsc PROC ; ; ; Receives: EAX = binary integer, ESI points to buffer ; ; Returns: buffer filled with ASCII digits ; ;---------------------------------------------------------; PackedToAsc PROC P push ecx push esi mov ecx,8 L1: rol eax,4 L mov bh,0 add al,bh aaa or al,30h mov BYTE PTR [esi],al inc esi loop L1 pop esi pop ecx ret PackedToAsc ENDP P END main...
View Full Document

This note was uploaded on 12/30/2009 for the course COS 231 taught by Professor Jasonlitz during the Summer '09 term at Thomas Edison State.

Page1 / 2

WA4 - ; ; PackedToAsc PROC ; ; ; Receives: EAX = binary...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online