Coprolite.com
Google
 
Web Coprolite.com
SignalQ Sites:
NetAdminTools - Coprolite - NoNIC - SpotBridge - NAW
RoboCoop - AreWeDown - SolarPower - SysAdminTools
Xfig - Gold Loaf - GeekPapa - FixGMC - MCJ - FixRambler
Categories:
GNU/Linux | Homebrew designs | Perl | Microcontrollers | Graphics | Z-80 | FreeDOS | Electronics | Odyssey 2 | 8048 | Other/Msc.

Last 30 Days | Last 60 Days | Last 90 Days | All Articles/Links


Categories:
·GNU/Linux
·Homebrew Designs
·Perl
·Microcontrollers
·Graphics
·Z-80
·FreeDOS
·Other/Msc.
·Electronics
·8048
·All Categories
·Other SignalQ Websites




8048 Homebrew Simulation - Part 4 - Sample Machine Code
Topic: 8048   Posted:2006-03-21
Printer Friendly: Print

spacerspacer
There are five articles in this series:

Part 1 - 8048 Homebrew Simulation - Introduction
Part 2 - 8048 Homebrew Simulation - Java Source
Part 3 - 8048 Homebrew Simulation - Operation
Part 4 - 8048 Homebrew Simulation - Sample Machine Code
Part 5 - 8048 Homebrew Simulation - Simulation

Here is the machine code that is running on this machine at start:

 
mem[0]=0x23; // load register a with following
mem[1]=0x00;
mem[2]=0xa8; // out put a to r0
mem[3]=0x17; // increment a
mem[4]=0xa9; // out put a to r1
mem[5]=0x17; // increment a
mem[6]=0xaa; // out put a to r2
mem[7]=0x17; // increment a
mem[8]=0xab; // out put a to r3
mem[9]=0x17; // increment a
mem[10]=0xac; // out put a to r4
mem[11]=0x17; // increment a
mem[12]=0xad; // out put a to r5
mem[13]=0x17; // increment a
mem[14]=0xae; // out put a to r6
mem[15]=0x17; // increment a
mem[16]=0xaf; // out put a to r7
mem[17]=0x17; // increment a
mem[18]=0x04; // jump to first page with following
mem[19]=0x02; 

Note that this is 8048 machine code. Also, I don't have many commands programmed yet. This is it! You can certainly fool around with the above commands. You really do have 64K mem locations to program from the front panel. When this code runs, you can see the program counter start at 0. When you toggle run, it loads up location 1, so the program counter never really has a state of 1. Likewise, when you get to 18 (12 Hex), you never see 19, because of the jump to location 2 on the first page.

There are five articles in this series:

Part 1 - 8048 Homebrew Simulation - Introduction
Part 2 - 8048 Homebrew Simulation - Java Source
Part 3 - 8048 Homebrew Simulation - Operation
Part 4 - 8048 Homebrew Simulation - Sample Machine Code
Part 5 - 8048 Homebrew Simulation - Simulation





Please read our Terms of Use
Microsoft, Windows, Windows XP, Windows 2000, and NT are either trademarks or registered trademarks of Microsoft Corporation. Coprolite.com is not affiliated with Microsoft Corporation. Linux is a registered trademark of Linus Torvalds. All logos and trademarks in this site are property of their respective owner. Copyright 1997-2008 Coprolite.com

Created by:
MCJ
MCJ CMS