Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using the HIPO below, create the routine in ASM code that would convert unsigned binary to PBCD. label:Bin2PBCD Input: Binary value in RegA Output: if

Using the HIPO below, create the routine in ASM code that would convert unsigned binary to PBCD.

image text in transcribed

label:Bin2PBCD Input: Binary value in RegA Output: if possible, PBCD number in RegB and Carry bit CLEAR; otherwise Carry bit SET. Process: If RegA >99 leave, otherwise divide by 10 for upper nibble, and place remainder in lower nibble 1) If RegA>99 then 1.1) TRUE: goto Step 2 1.2) FALSE: goto Step 4 2) Set Carry bit 3) Goto Step 10 4) Put 0 in register labelled Tens 5) If RegA>10 then 5.1) TRUE: goto Step 6 5.2) FALSE: goto Step 9 6) Subtract 10 from RegA, and store result in working register 7) Increment the value in the Tens register and store in the Tens register 8) Goto Step 5 9) Move value in RegA to lower nibble of RegB 10) Move value in Tens register to upper nibble of RegB 11) Leave routine

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server T-SQL Recipes

Authors: David Dye, Jason Brimhall

4th Edition

1484200616, 9781484200612

More Books

Students also viewed these Databases questions