element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
element14's The Ben Heck Show
  • Challenges & Projects
  • element14 presents
  • element14's The Ben Heck Show
  • More
  • Cancel
element14's The Ben Heck Show
Forum Custom Language Advice
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join element14's The Ben Heck Show to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 0 replies
  • Subscribers 28 subscribers
  • Views 192 views
  • Users 0 members are here
  • hardware
  • arduino
Related

Custom Language Advice

Former Member
Former Member over 10 years ago

Hello, I have been working on a custom assembly language on my arduino. I would like to have an idea of what kind of commands I should include, and if you can, some example code for this code at the bottom. One particular one I would like to figure out is an IF command. I will share my current code for whoever is reading this so they can have an idea of what I am doing. I would also like to mention that this is a kind of emulation of a language, and is not actually written in assembly or machine language. My goal was to make an 8 bit computer, like the Altair 8800. It is called Quentin's Machine Code. I know that in the example code, I am using EEPROM, and that is a bad Idea for this, so I am going to obtain some FRAM soon for this purpose. They should remake the ATMEGA chip to have FRAM in it, that would be useful.

 

code (It's still in development, so it's not going to be all that compressed):

#include <EEPROM.h>

 

 

int address = 0;

byte value;

byte cvalue;

void setup()

{

  Serial.begin(9600);

  // Clearer

  for (int i = 0; i < 255; i++){

    EEPROM.write(i, 0);

  }

  // QMC code gets programmed here

  // An example for whoever

  //Write 255 at address 7

  EEPROM.write(0,2);

  EEPROM.write(1,7);

  EEPROM.write(2,255);

  //Look at and return address 7

  EEPROM.write(3,1);

  EEPROM.write(4,7);

  //Jump back to address 3

  EEPROM.write(5,3);

  EEPROM.write(6,3);

 

 

  // End of QMC code

}

 

 

// Advancer and interpreter

void loop()

{

  value = EEPROM.read(address);

  //SKIP

  if (value == 0)

  {

    address = address + 1;

  }

 

  //PEEK

  if (value == 1)

  {

    Serial.println(EEPROM.read(EEPROM.read(address + 1)), BIN);

    address = address + 2;

  }

 

  //POKE

  if (value == 2)

  {

    EEPROM.write(EEPROM.read(address + 1),EEPROM.read(address + 2));

    address = address + 3;

  }

   

  //JUMP

  if (value == 3)

  {

    cvalue = EEPROM.read(address + 1);

    address = cvalue - 1;

    address = address + 1;

  }

 

  //HALT

  if (value == 4)

  {

    address = address - 1;

    address = address + 1;

  }

 

  //RESTART

  if (value == 5)

  {

    address = 0;

  } 

 

  // speed

  delay(1000);

}

  • Sign in to reply
  • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube