Post Reply 
Converting from one base to another?
04-10-2016, 06:24 PM
Post: #10
RE: Converting from one base to another?
Thanks very much to all who have offered their advice. I greatly appreciate your assistance.

Here is the code that I now have working:
Code:
// LoadCode
//
// Load 8080 code into M1
// Input the first location in decimal, then increment from there
// Input the 8080 code as hex bytes, convert to decimal and store
//
LOCAL loc,byte,temp;
//
EXPORT LoadCode()
BEGIN
  byte:="";
  loc:=0;
  temp:=0;
  INPUT(loc,"Starting Location","Start=","Enter the starting location in decimal",0);
  WHILE (1) DO
    INPUT(
      {{byte,[2]}},
      "8080 Code",
      {"Byte="},
      {"Enter a byte as a hex number"},
      {""},
      {""}
      );
    temp:=EXPR("#"+byte+"h");
    M1(loc):=SETBASE(temp,3);
    loc:=loc+1;
  END;
END;

Thanks again!

smp
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Converting from one base to another? - smp - 04-09-2016, 10:02 PM
RE: Converting from one base to another? - smp - 04-10-2016 06:24 PM



User(s) browsing this thread: 6 Guest(s)