SlideShare a Scribd company logo
1 of 8
Download to read offline
MITS Altair Programming Tutorial
By Mihai Pruna
mihaipruna.com
I always wanted to learn to program a computer in Machine Code (just 1s and 0s, the true language of
computers). Recently I started reading a biography of Bill Gates (ISBN-10: 0385420757), which starts in
the early days of widely available computing. The era of the personal computer and the success of
Microsoft were both ushered in by a device that, if purchased without accessories, did not have a
keyboard or monitor, yet could be fully programmed using switches and blinking lights: The MITS Altair.
This is a tutorial for a simple program for the MITS Altair computer.
You can use a web-based emulator of the MITS Altair, as well as read the full operating manual, here:
http://www.s2js.com/altair/
The Intel 8080 processor of the Altair is a great device to learn to program in Assembly Language.
Here are more resources for programming the 8080 in Assembly:
http://www.hartetechnologies.com/manuals/Unclassified/8080_Machine_Language_Programming_for
_Beginner.PDF
http://altairclone.com/downloads/manuals/8080%20Programmers%20Manual.pdf
This tutorial shows a simple program comparing two numbers. You should do this tutorial after you are
able to write and run and understand the first program in the Altair Operating Manual
(http://www.classiccmp.org/dunfield/altair/d/88opman.pdf) which adds two numbers, as this tutorial is
based on the addition example. This example is more complex than the addition example in the manual,
but, also, much simpler than the multiplication example.
Below is a memory map and program and data storage. I found Excel to be a great way to organize and
design your code. Just like in the addition tutorial, I used memory locations 128 and 129 to store the two
numbers, and memory address 130 to store the result, in this case the largest number. These numbers
are in decimal notation. Binary equivalents also given for every address and instruction for inputting via
the Altair front panel.
The first column is the contents of the memory of the Altair in decimal. The second in binary. The third is
the instruction mnemonic. The instruction can occupy more than one byte if values or addresses are
specified as arguments.
Memory Address Dec
Memory
Address Bin
Instruction Binary Value Comment
0 00000000 LDA 00 111 010
Load accumulator w
content at address 128
1 00000001 10 000 000
2 00000010 00 000 000
3 00000011 MOV A->B 01 000 111
Move from Accumulator to
Register B
4 00000100 LDA 00 111 010
Load accumulator w
content at address 129
5 00000101 10 000 001
6 00000110 00 000 000
7 00000111 CMP A,B 10 111 000
Compare accumulator with
register B . If B>A then
carry bit is 1 otherwise
carry bit is 0. This means if
# at 129> # at 128 carry bit
is 0
8 00001000 JC 11 011 010
Jump to address and
execute instruction there
9 00001001 00 010 001
10 00001010 00 000 000
11 00001011 STA 00 110 010
This is no carry so # at 129
> # at 128 thus we write
#129 in address 130.
Accumulator already has
129 so we write A to 130
12 00001100 10 000 010
13 00001101 00 000 000
14 00001110 JMP 11 000 011
Go back to beginning of
program
15 00001111 00 000 000
16 00010000 00 000 000
17 00010001 LDA 00 111 010
This is for carry where we
jump so we can set 130 to
the value of 128
18 00010010 10 000 000
19 00010011 00 000 000
20 00010100 STA 00 110 010
Store accumulator which
has value from 128 at 130
21 00010101 10 000 010
22 00010110 00 000 000
23 00010111 JMP 11 000 011
Go back to beginning of
program
24 00011000 00 000 000
25 00011001 00 000 000
26 00011010
27 00011011
28 00011100
29 00011101
… …. …. …. ……
125 01111101
126 01111110
127 01111111
128 10000000 first number
129 10000001 second number
130 10000010 largest number
….
255 11111111
Below are some relevant excerpts from the operating manual:
How to start writing the program (from example)
Load accumulator with memory content for number 1:
The load accumulator command reference:
Move from accumulator to B
Move data command reference:
Load accumulator with memory content for number 2
Compare B to Accumulator. If B>Accumulator, Carry bit is 1.
Code for register B:
The Jump if Carry command goes to specified address if carry bit is 1.
Write accumulator to result memory address
Store accumulator at memory address command reference:
Jump to beginning of program to keep executing it:
Jump command reference:
How to use the program:

More Related Content

What's hot

Sự khác biệt giữa tài khoản Admin, Standard, Work & School và Guest trong Win...
Sự khác biệt giữa tài khoản Admin, Standard, Work & School và Guest trong Win...Sự khác biệt giữa tài khoản Admin, Standard, Work & School và Guest trong Win...
Sự khác biệt giữa tài khoản Admin, Standard, Work & School và Guest trong Win...Đạt Ngô
 
Bài 7: Xác thực và quản lý tài khoản - Giáo trình FPT
Bài 7: Xác thực và quản lý tài khoản - Giáo trình FPTBài 7: Xác thực và quản lý tài khoản - Giáo trình FPT
Bài 7: Xác thực và quản lý tài khoản - Giáo trình FPTMasterCode.vn
 
Bài 1: Tìm hiểu về phần mềm miễn phí và phần mềm tự do, nguồn mở
Bài 1: Tìm hiểu về phần mềm miễn phí và phần mềm tự do, nguồn mởBài 1: Tìm hiểu về phần mềm miễn phí và phần mềm tự do, nguồn mở
Bài 1: Tìm hiểu về phần mềm miễn phí và phần mềm tự do, nguồn mởMasterCode.vn
 
Xây dựng hệ thống quản lý cửa hàng bán sách, đĩa nhạc, đĩa phim Media One
Xây dựng hệ thống quản lý cửa hàng bán sách, đĩa nhạc, đĩa phim Media OneXây dựng hệ thống quản lý cửa hàng bán sách, đĩa nhạc, đĩa phim Media One
Xây dựng hệ thống quản lý cửa hàng bán sách, đĩa nhạc, đĩa phim Media Oneanh hieu
 
Banco de dados atividade de sala
Banco de dados atividade de salaBanco de dados atividade de sala
Banco de dados atividade de salaCarlos Melo
 
Bài 2 Cài đặt Windows Server 2008 - Giáo trình FPT
Bài 2 Cài đặt Windows Server 2008 - Giáo trình FPTBài 2 Cài đặt Windows Server 2008 - Giáo trình FPT
Bài 2 Cài đặt Windows Server 2008 - Giáo trình FPTMasterCode.vn
 
Hệ điều hành (chương 5)
Hệ điều hành (chương 5)Hệ điều hành (chương 5)
Hệ điều hành (chương 5)realpotter
 
CLASSES, STRUCTURE,UNION in C++
CLASSES, STRUCTURE,UNION in C++CLASSES, STRUCTURE,UNION in C++
CLASSES, STRUCTURE,UNION in C++Prof Ansari
 
Bài giảng thực hành windows server 2008 776030
Bài giảng thực hành windows server 2008 776030Bài giảng thực hành windows server 2008 776030
Bài giảng thực hành windows server 2008 776030trucmt2000
 
Hệ điều hành (chương 3)
Hệ điều hành (chương 3)Hệ điều hành (chương 3)
Hệ điều hành (chương 3)realpotter
 
การติดตั้งและเปิดใช้งาน IIS
การติดตั้งและเปิดใช้งาน IISการติดตั้งและเปิดใช้งาน IIS
การติดตั้งและเปิดใช้งาน IISmrprasirtsit
 
Windows Server 2003
Windows Server 2003Windows Server 2003
Windows Server 2003Goncalo
 
Motherboard.pdf
Motherboard.pdfMotherboard.pdf
Motherboard.pdffmtpereira
 
Kiến trúc máy tính và hợp ngữ bài 04
Kiến trúc máy tính và hợp ngữ bài 04Kiến trúc máy tính và hợp ngữ bài 04
Kiến trúc máy tính và hợp ngữ bài 04Nhóc Nhóc
 
Dicas de como usar o winrar
Dicas de como usar o winrarDicas de como usar o winrar
Dicas de como usar o winrarBlogs Microcamp
 

What's hot (20)

Bai tap excel
Bai tap excelBai tap excel
Bai tap excel
 
Sự khác biệt giữa tài khoản Admin, Standard, Work & School và Guest trong Win...
Sự khác biệt giữa tài khoản Admin, Standard, Work & School và Guest trong Win...Sự khác biệt giữa tài khoản Admin, Standard, Work & School và Guest trong Win...
Sự khác biệt giữa tài khoản Admin, Standard, Work & School và Guest trong Win...
 
Comando Traceroute
Comando TracerouteComando Traceroute
Comando Traceroute
 
Bài 7: Xác thực và quản lý tài khoản - Giáo trình FPT
Bài 7: Xác thực và quản lý tài khoản - Giáo trình FPTBài 7: Xác thực và quản lý tài khoản - Giáo trình FPT
Bài 7: Xác thực và quản lý tài khoản - Giáo trình FPT
 
Bài 1: Tìm hiểu về phần mềm miễn phí và phần mềm tự do, nguồn mở
Bài 1: Tìm hiểu về phần mềm miễn phí và phần mềm tự do, nguồn mởBài 1: Tìm hiểu về phần mềm miễn phí và phần mềm tự do, nguồn mở
Bài 1: Tìm hiểu về phần mềm miễn phí và phần mềm tự do, nguồn mở
 
Xây dựng hệ thống quản lý cửa hàng bán sách, đĩa nhạc, đĩa phim Media One
Xây dựng hệ thống quản lý cửa hàng bán sách, đĩa nhạc, đĩa phim Media OneXây dựng hệ thống quản lý cửa hàng bán sách, đĩa nhạc, đĩa phim Media One
Xây dựng hệ thống quản lý cửa hàng bán sách, đĩa nhạc, đĩa phim Media One
 
Banco de dados atividade de sala
Banco de dados atividade de salaBanco de dados atividade de sala
Banco de dados atividade de sala
 
Bài 2 Cài đặt Windows Server 2008 - Giáo trình FPT
Bài 2 Cài đặt Windows Server 2008 - Giáo trình FPTBài 2 Cài đặt Windows Server 2008 - Giáo trình FPT
Bài 2 Cài đặt Windows Server 2008 - Giáo trình FPT
 
Fonte De Alimentação
Fonte De AlimentaçãoFonte De Alimentação
Fonte De Alimentação
 
Hệ điều hành (chương 5)
Hệ điều hành (chương 5)Hệ điều hành (chương 5)
Hệ điều hành (chương 5)
 
CLASSES, STRUCTURE,UNION in C++
CLASSES, STRUCTURE,UNION in C++CLASSES, STRUCTURE,UNION in C++
CLASSES, STRUCTURE,UNION in C++
 
Giáo trình access2010
Giáo trình access2010Giáo trình access2010
Giáo trình access2010
 
Bài giảng thực hành windows server 2008 776030
Bài giảng thực hành windows server 2008 776030Bài giảng thực hành windows server 2008 776030
Bài giảng thực hành windows server 2008 776030
 
Hệ điều hành (chương 3)
Hệ điều hành (chương 3)Hệ điều hành (chương 3)
Hệ điều hành (chương 3)
 
Interface do windows
Interface do windowsInterface do windows
Interface do windows
 
การติดตั้งและเปิดใช้งาน IIS
การติดตั้งและเปิดใช้งาน IISการติดตั้งและเปิดใช้งาน IIS
การติดตั้งและเปิดใช้งาน IIS
 
Windows Server 2003
Windows Server 2003Windows Server 2003
Windows Server 2003
 
Motherboard.pdf
Motherboard.pdfMotherboard.pdf
Motherboard.pdf
 
Kiến trúc máy tính và hợp ngữ bài 04
Kiến trúc máy tính và hợp ngữ bài 04Kiến trúc máy tính và hợp ngữ bài 04
Kiến trúc máy tính và hợp ngữ bài 04
 
Dicas de como usar o winrar
Dicas de como usar o winrarDicas de como usar o winrar
Dicas de como usar o winrar
 

Similar to A tutorial on programming the Mits Altair computer by Mihai Pruna

Microproccesor and Microcontrollers hardware basics
Microproccesor and Microcontrollers hardware basicsMicroproccesor and Microcontrollers hardware basics
Microproccesor and Microcontrollers hardware basicsashmus
 
Programming with 8085.pptx
Programming with 8085.pptxProgramming with 8085.pptx
Programming with 8085.pptxSachinKupade
 
Embedded Application : An Autonomous Robot or Line Follower Bot
Embedded Application : An Autonomous Robot or Line Follower BotEmbedded Application : An Autonomous Robot or Line Follower Bot
Embedded Application : An Autonomous Robot or Line Follower BotEr. Raju Bhardwaj
 
Introduction to 8085 & it's description(includes basic lab experiments)
Introduction to 8085 & it's description(includes basic lab experiments)Introduction to 8085 & it's description(includes basic lab experiments)
Introduction to 8085 & it's description(includes basic lab experiments)Basil John
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to ArduinoKarim El-Rayes
 
Presentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptxPresentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptxMinahilUmar1
 
Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...
Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...
Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...Sivaranjan Goswami
 
8085 micro processor
8085 micro processor8085 micro processor
8085 micro processorArun Umrao
 
Notes of 8085 micro processor Programming for BCA, MCA, MSC (CS), MSC (IT) &...
Notes of 8085 micro processor Programming  for BCA, MCA, MSC (CS), MSC (IT) &...Notes of 8085 micro processor Programming  for BCA, MCA, MSC (CS), MSC (IT) &...
Notes of 8085 micro processor Programming for BCA, MCA, MSC (CS), MSC (IT) &...ssuserd6b1fd
 
Avr generator
Avr generatorAvr generator
Avr generatorHarie Tr
 
CHAPTER 2_INTRO TO COMPUTER SYSTEM.pptx
CHAPTER 2_INTRO TO COMPUTER SYSTEM.pptxCHAPTER 2_INTRO TO COMPUTER SYSTEM.pptx
CHAPTER 2_INTRO TO COMPUTER SYSTEM.pptxssuser2f3ce7
 
Computer arithmetics coa project pdf version
Computer arithmetics coa project pdf versionComputer arithmetics coa project pdf version
Computer arithmetics coa project pdf versionSuryaKumarSahani
 

Similar to A tutorial on programming the Mits Altair computer by Mihai Pruna (20)

Siemens PLC Programming Example #2
Siemens PLC Programming Example #2Siemens PLC Programming Example #2
Siemens PLC Programming Example #2
 
Microproccesor and Microcontrollers hardware basics
Microproccesor and Microcontrollers hardware basicsMicroproccesor and Microcontrollers hardware basics
Microproccesor and Microcontrollers hardware basics
 
EE2356 Microprocessor and Microcontroller Lab Manuel
EE2356 Microprocessor and Microcontroller Lab ManuelEE2356 Microprocessor and Microcontroller Lab Manuel
EE2356 Microprocessor and Microcontroller Lab Manuel
 
CH06 (1).PPT
CH06 (1).PPTCH06 (1).PPT
CH06 (1).PPT
 
Programming with 8085.pptx
Programming with 8085.pptxProgramming with 8085.pptx
Programming with 8085.pptx
 
8051notes
8051notes8051notes
8051notes
 
Embedded Application : An Autonomous Robot or Line Follower Bot
Embedded Application : An Autonomous Robot or Line Follower BotEmbedded Application : An Autonomous Robot or Line Follower Bot
Embedded Application : An Autonomous Robot or Line Follower Bot
 
Introduction to 8085 & it's description(includes basic lab experiments)
Introduction to 8085 & it's description(includes basic lab experiments)Introduction to 8085 & it's description(includes basic lab experiments)
Introduction to 8085 & it's description(includes basic lab experiments)
 
Microprocessor lab manual
Microprocessor lab manualMicroprocessor lab manual
Microprocessor lab manual
 
Lab manual mp
Lab manual mpLab manual mp
Lab manual mp
 
Sap 1
Sap 1Sap 1
Sap 1
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Presentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptxPresentation of ICT.ppt.pptx
Presentation of ICT.ppt.pptx
 
Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...
Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...
Introduction to Embedded C for 8051 and Implementation of Timer and Interrupt...
 
8085 micro processor
8085 micro processor8085 micro processor
8085 micro processor
 
Notes of 8085 micro processor Programming for BCA, MCA, MSC (CS), MSC (IT) &...
Notes of 8085 micro processor Programming  for BCA, MCA, MSC (CS), MSC (IT) &...Notes of 8085 micro processor Programming  for BCA, MCA, MSC (CS), MSC (IT) &...
Notes of 8085 micro processor Programming for BCA, MCA, MSC (CS), MSC (IT) &...
 
Avr generator
Avr generatorAvr generator
Avr generator
 
CHAPTER 2_INTRO TO COMPUTER SYSTEM.pptx
CHAPTER 2_INTRO TO COMPUTER SYSTEM.pptxCHAPTER 2_INTRO TO COMPUTER SYSTEM.pptx
CHAPTER 2_INTRO TO COMPUTER SYSTEM.pptx
 
Computer arithmetics coa project pdf version
Computer arithmetics coa project pdf versionComputer arithmetics coa project pdf version
Computer arithmetics coa project pdf version
 
Mcs 012 soved assignment 2015-16
Mcs 012 soved assignment 2015-16Mcs 012 soved assignment 2015-16
Mcs 012 soved assignment 2015-16
 

Recently uploaded

Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptxVinzoCenzo
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 

Recently uploaded (20)

Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
Osi security architecture in network.pptx
Osi security architecture in network.pptxOsi security architecture in network.pptx
Osi security architecture in network.pptx
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 

A tutorial on programming the Mits Altair computer by Mihai Pruna

  • 1. MITS Altair Programming Tutorial By Mihai Pruna mihaipruna.com I always wanted to learn to program a computer in Machine Code (just 1s and 0s, the true language of computers). Recently I started reading a biography of Bill Gates (ISBN-10: 0385420757), which starts in the early days of widely available computing. The era of the personal computer and the success of Microsoft were both ushered in by a device that, if purchased without accessories, did not have a keyboard or monitor, yet could be fully programmed using switches and blinking lights: The MITS Altair. This is a tutorial for a simple program for the MITS Altair computer. You can use a web-based emulator of the MITS Altair, as well as read the full operating manual, here: http://www.s2js.com/altair/ The Intel 8080 processor of the Altair is a great device to learn to program in Assembly Language. Here are more resources for programming the 8080 in Assembly: http://www.hartetechnologies.com/manuals/Unclassified/8080_Machine_Language_Programming_for _Beginner.PDF http://altairclone.com/downloads/manuals/8080%20Programmers%20Manual.pdf This tutorial shows a simple program comparing two numbers. You should do this tutorial after you are able to write and run and understand the first program in the Altair Operating Manual (http://www.classiccmp.org/dunfield/altair/d/88opman.pdf) which adds two numbers, as this tutorial is based on the addition example. This example is more complex than the addition example in the manual, but, also, much simpler than the multiplication example. Below is a memory map and program and data storage. I found Excel to be a great way to organize and design your code. Just like in the addition tutorial, I used memory locations 128 and 129 to store the two numbers, and memory address 130 to store the result, in this case the largest number. These numbers are in decimal notation. Binary equivalents also given for every address and instruction for inputting via the Altair front panel. The first column is the contents of the memory of the Altair in decimal. The second in binary. The third is the instruction mnemonic. The instruction can occupy more than one byte if values or addresses are specified as arguments.
  • 2. Memory Address Dec Memory Address Bin Instruction Binary Value Comment 0 00000000 LDA 00 111 010 Load accumulator w content at address 128 1 00000001 10 000 000 2 00000010 00 000 000 3 00000011 MOV A->B 01 000 111 Move from Accumulator to Register B 4 00000100 LDA 00 111 010 Load accumulator w content at address 129 5 00000101 10 000 001 6 00000110 00 000 000 7 00000111 CMP A,B 10 111 000 Compare accumulator with register B . If B>A then carry bit is 1 otherwise carry bit is 0. This means if # at 129> # at 128 carry bit is 0 8 00001000 JC 11 011 010 Jump to address and execute instruction there 9 00001001 00 010 001 10 00001010 00 000 000 11 00001011 STA 00 110 010 This is no carry so # at 129 > # at 128 thus we write #129 in address 130. Accumulator already has 129 so we write A to 130 12 00001100 10 000 010 13 00001101 00 000 000 14 00001110 JMP 11 000 011 Go back to beginning of program 15 00001111 00 000 000 16 00010000 00 000 000 17 00010001 LDA 00 111 010 This is for carry where we jump so we can set 130 to the value of 128 18 00010010 10 000 000 19 00010011 00 000 000 20 00010100 STA 00 110 010 Store accumulator which has value from 128 at 130 21 00010101 10 000 010 22 00010110 00 000 000
  • 3. 23 00010111 JMP 11 000 011 Go back to beginning of program 24 00011000 00 000 000 25 00011001 00 000 000 26 00011010 27 00011011 28 00011100 29 00011101 … …. …. …. …… 125 01111101 126 01111110 127 01111111 128 10000000 first number 129 10000001 second number 130 10000010 largest number …. 255 11111111 Below are some relevant excerpts from the operating manual: How to start writing the program (from example)
  • 4. Load accumulator with memory content for number 1: The load accumulator command reference: Move from accumulator to B
  • 5. Move data command reference: Load accumulator with memory content for number 2 Compare B to Accumulator. If B>Accumulator, Carry bit is 1.
  • 6. Code for register B: The Jump if Carry command goes to specified address if carry bit is 1. Write accumulator to result memory address Store accumulator at memory address command reference:
  • 7. Jump to beginning of program to keep executing it: Jump command reference:
  • 8. How to use the program: