<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>csci2230/273 on Jonathan Cook</title>
    <link>http://www.cs.nmsu.edu/~jcook/tags/csci2230/273/</link>
    <description>Recent content in csci2230/273 on Jonathan Cook</description>
    <generator>Hugo -- gohugo.io</generator><atom:link href="http://www.cs.nmsu.edu/~jcook/tags/csci2230/273/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Addressing Modes</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/273/addressing/</link>
      <pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/273/addressing/</guid>
      <description>Addressing Modes We have load and store instructions to get data to and from memory. To make certain types of programming easier, such as accessing an array of data, the AVR supports several different addressing modes, or ways of accessing memory locations.
 Immediate: The actual data is located in memory immediately following the instruction&#39;s opcode: only useful for a constant Direct: The 16-bit address of the data is located immediately following the opcode: used for accessing single global variables Indirect: The value in an index register (X, Y, or Z) is as the address of the data, potentially in addition to a constant offset.</description>
    </item>
    
    <item>
      <title>AVR Stack Operations</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/273/avr-stackops/</link>
      <pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/273/avr-stackops/</guid>
      <description>Stacks and the SP &amp;quot;Register&amp;quot; A stack is a data structure that holds data items. It is a special type of data structure, because it is very limited in the way you can access the elements. You can push a data item onto the stack, or you can pop an item off of the stack. Think of stacking blocks one on top of each other. When you push (or place) a block onto the stack, it is at the top of the stack.</description>
    </item>
    
    <item>
      <title>Basic Computer Operation</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/273/basic-computer-op/</link>
      <pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/273/basic-computer-op/</guid>
      <description>Basic Computer Operation From the notes on numbers we learned that all values in a computer are in binary: just lots and lots of 1&#39;s and 0&#39;s.
This means that the data looks like &amp;quot;01100010101001000011110010111&amp;quot; And the machine instructions look like &amp;quot;0110001110101010111100&amp;quot; as well!
Recall that the memory holds both instructions and data. So, the memory holds a bunch of bits (actually lots and lots of bits!)
How do we get at the values in memory?</description>
    </item>
    
    <item>
      <title>Bit Manipulation</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/273/bit-manipulation/</link>
      <pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/273/bit-manipulation/</guid>
      <description>Manipulating and Testing Bits Remember the logical operators: AND, OR, NOT, XOR. Since each bit is essentially a boolean value, these can be applied as bit operators, too.
AVR instructions: AND, ANDI, OR, ORI, EOR, COM, and NEG
 Shifts and Rotates There are a variety of instructions that move bits through a register, called shifts and rotates. These instructions shift the bit values in a register one position either left or right -- that is, bit 3 gets the value of bit 2 in a left shift, and it gets the value of bit 4 in a right shift.</description>
    </item>
    
    <item>
      <title>Branching in Assembly Code</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/273/branches/</link>
      <pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/273/branches/</guid>
      <description>Branches In high-level programming languages, we usually don&#39;t have to think about how our code branches -- it is implicit in the control structures and the curly braces. For example, we know implicitly that if an if condition is false our program will branch to the else clause, and that at the closing brace of a loop body our program will branch back up to the loop condition at the top.</description>
    </item>
    
    <item>
      <title>C Pointers in HC11</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/273/hc11-pointers/</link>
      <pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/273/hc11-pointers/</guid>
      <description>Pointers in the C programming language, or references in the Java language, are variables that &amp;quot;point&amp;quot; to a data variable -- they are not data themselves (though they are variables!). How would you create a pointer variable on the HC11?. Well, the only addressing mode that allows an instruction to access changing memory locations is the Indexed addressing mode. We&#39;ve used it up til now to access arrays -- the changing address just stepped through (or accessed) the different elements in an array.</description>
    </item>
    
    <item>
      <title>Comparison and Condition Codes</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/273/condition-codes/</link>
      <pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/273/condition-codes/</guid>
      <description>Condition Code or Status Register (SREG) We have introduced the idea of a &amp;quot;compare&amp;quot; machine instruction and then a &amp;quot;conditional branch&amp;quot; instruction that depends on the result that was produced by the compare instruction. But where is that result saved? It is in the status register (SREG).
The SREG is an 8-bit register. But it is not treated as an 8-bit value.
Each bit is a true/false flag for some condition that you (the programmer) might have to test for.</description>
    </item>
    
    <item>
      <title>CS 273 Course Review</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/273/cs273-review/</link>
      <pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/273/cs273-review/</guid>
      <description>Course Review  
Reading: Textbook, pp 11-23\
 Bus-Based Architecture
 Address/Data bus between CPU and memory and I/O Our HC11 happens to have on-chip memory, but the idea is the same The HC11 has a 16 bit address bus, and an 8-bit data bus  ISA -- Instruction Set Architecture
Registers
Instructions
Condition Codes
Address space
Addressing modes
I/O design
 separate address space (Intel x86) or memory-mapped I/O (HC11)  Control Registers</description>
    </item>
    
    <item>
      <title>CS 273 Introduction</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/273/cs273-intro/</link>
      <pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/273/cs273-intro/</guid>
      <description>High Level Programming Languages  Are geared (somewhat) towards how we think, not how the computer computes. Are independent of what type of computer you are using (e.g., PC, MAC, Sun) Must be translated into how the computer computes  this is done by a compiler or an interpreter   But how do computers compute, and why do different types matter?  Computers 
{width=&amp;ldquo;431&amp;rdquo; height=&amp;ldquo;316&amp;rdquo;}
A Computer has (essentially) three things</description>
    </item>
    
    <item>
      <title>Floating Point Representation</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/273/floating-point/</link>
      <pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/273/floating-point/</guid>
      <description>Programming with Real Numbers and their Floating Point Representation Thus far in class we have dealt only with integer values. We have seen a simple, direct unsigned binary representation for positive integers, and the Two&#39;s Complement (2C) representation for signed integers (both positive and negative).
Higher-level programming languages offer us the ability to use real numbers, simply because many problems need to calculate fractional values, not just integers. It is extremely useful for a programmer to understand how these real numbers are stored, so that they understand what might go wrong when they use real values.</description>
    </item>
    
    <item>
      <title>HC11 Input and Output (I/O)</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/273/hc11-io/</link>
      <pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/273/hc11-io/</guid>
      <description>Input and Output with the HC11 HC11 does I/O and other &amp;quot;extracirricular activities&amp;quot; through various ports. Each port is an 8-bit, or 1 byte, port. Each bit in the port corresponds to a real pin on the CPU, and thus the value of that bit (1 or 0) corresponds to a real voltage level on the circuit board.
Port A is timers and counters. It is input/output.
Port B is a parallel output port.</description>
    </item>
    
    <item>
      <title>HC11 Serial I/O</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/273/hc11-serialio/</link>
      <pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/273/hc11-serialio/</guid>
      <description>Serial Communications We said earlier that the HC11 has the ability to do serial communication, which is what hexmon uses when you tested your board out, and also how it downloads your program into EEPROM. Serial communication is done through PORT D, but the way it is programmed is quite different than other ports.
Basic concepts of serial communications Parallel communication is when all the bits of a value are sent to the receiver at the same time, i.</description>
    </item>
    
    <item>
      <title>Interrups and Timers</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/273/interrupts-timers/</link>
      <pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/273/interrupts-timers/</guid>
      <description>Interrupts An interrupt is an event which stops the normal execution of your program, makes the CPU go off and do something else (like respond to the condition that caused the interrupt). When the CPU finishes what it needed to do, your program continues execution whereever it left off, as if the interrupt never happened (except, time has passed, and some memory locations could be changed).
All computers have interrupts. If you&#39;ve ever installed a peripheral device onto a PC, you may have had to select &amp;quot;IRQ&amp;quot; addresses, or have seen the system select them automatically in the case of plug-n-play.</description>
    </item>
    
    <item>
      <title>Logic Circuits and Flip Flops</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/273/logic-circuits/</link>
      <pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/273/logic-circuits/</guid>
      <description>Combinational Circuits, Boolean Algebra, and Flip Flops 
In this class we have seen basic bit, or boolean, operations -- AND, OR, NOT, and XOR. We said that these operations are not only useful for logical conditions (in high level programmig languages), but are also useful at the bit level -- for testing and changing individual bits. Since a bit is a 1 or a 0, and a logic value is True or False, these operations are equivalent whether you are talking about bits or logical values.</description>
    </item>
    
    <item>
      <title>Machine Instructions and Assembly Code</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/273/assembly/</link>
      <pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/273/assembly/</guid>
      <description>Machine Instructions and Assembly Language So, now we know about instructions, addresses, and registers. Let&#39;s get to specifics
The machine instructions look like &amp;quot;01101010&amp;quot; -- they are just a sequence of bits
 E.g., the 16-bit word 0001101100010010 ($1B12) means &amp;quot;Subtract register 18 from register 17&amp;quot; to an AVR CPU  But we don&#39;t want to program using 1s and 0s, do we?
 Actually, that is how computers were first programmed.</description>
    </item>
    
    <item>
      <title>Numbers and Numbering Systems</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/273/numbers/</link>
      <pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/273/numbers/</guid>
      <description>Our normal use of numbers is always in the decimal, or base-10, numbering system. The digits of 0 to 9 represent the values directly representable in base-10 (in any base, the digits are always from zero to one minus the value of the base).
To represent larger values, our numbering systems use positional notation. In this scheme, a digit can represent a value larger than its direct value. Thus
329 == 300 + 20 + 9</description>
    </item>
    
    <item>
      <title>The 68HC11 Microcontroller</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/273/the-hc11/</link>
      <pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/273/the-hc11/</guid>
      <description>The 68HC11 Microcontroller We just called the HC11 a microcontroller. Why? Well, it has the processor, the memory, and the I/O capability all embedded onto a single chip. This makes it a cheap solution to controlling fairly small systems, like microwaves or other such things.
Let&#39;s talk specifics:
The HC11 is an 8-bit processor
 It computes (mostly) in bytes It fetches only a byte at a time from memory or I/O (i.</description>
    </item>
    
    <item>
      <title>The Atmel AVR Microcontroller</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/273/the-avr/</link>
      <pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/273/the-avr/</guid>
      <description>The Atmel AVR Microcontroller We just called the AVR a microcontroller. Why? Well, it has the processor, the memory, and the I/O capability all embedded onto a single chip. This makes it a cheap solution to controlling fairly small systems, like microwaves or other such things.
Let&#39;s talk specifics:
The AVR is an 8-bit processor: it computes (mostly) in bytes
It uses 16 bit addresses
Registers:
A mostly general-purpose register set of 32 8-bit registers</description>
    </item>
    
    <item>
      <title>Two&#39;s Complement</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/273/twos-complement/</link>
      <pubDate>Tue, 20 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/273/twos-complement/</guid>
      <description>Negative Numbers: Two&#39;s complement representation So far, we&#39;ve just used positive numbers. If you have tried the last part of lab one yet, you have seen that the result is a negative number. Does the AVR CPU know this? How do we know this? In lab 1 it is easy because we can do the arithmetic by hand and see that a negative answer is correct, but if we don&#39;t know ahead of time, how do we know when we are programming?</description>
    </item>
    
    <item>
      <title>Numbers and Numbering Systems</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/number-systems/</link>
      <pubDate>Wed, 07 Jan 2026 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/number-systems/</guid>
      <description>Probably by now you have heard the terms binary, bit, and byte somewhere already, and maybe you already know exactly what they mean and why they are used. But read on anyways!
The prefix &amp;ldquo;bi&amp;rdquo; means two, and so binary is a two-valued (or base-2) number system, with only the digits 0 and 1. Why is binary important? Well, in short, because computers operate in binary. Computers are electrical machines; everything we do with them must end up as electrical signals.</description>
    </item>
    
    <item>
      <title>RISC-V: An Open CPU Architecture</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/riscv-info/</link>
      <pubDate>Mon, 26 Aug 2024 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/riscv-info/</guid>
      <description>RISC-V is an open CPU architecture that is a neat development in the history of CPUs and computing. This page is a start of collecting information and links about it. This page also has direct content to help NMSU CS 370 students in using RISC-V as a compiler target language.
The official RISC-V Home is always a good place to start, but it&amp;rsquo;s documentation wiki is probably better for technical info.</description>
    </item>
    
    <item>
      <title>Basic X86-64 Assembly Language</title>
      <link>http://www.cs.nmsu.edu/~jcook/posts/basic-x86-64-assembly/</link>
      <pubDate>Fri, 15 Oct 2021 00:00:00 +0000</pubDate>
      
      <guid>http://www.cs.nmsu.edu/~jcook/posts/basic-x86-64-assembly/</guid>
      <description>Intel x86-64 is a 64-bit Instruction Set Architecture that is used by all 64-bit Intel CPUs and all clones such as AMD CPUs. Intel first created the beginnings of its &amp;ldquo;x86&amp;rdquo; assembly language way back in about the early 1980&amp;rsquo;s with its 8088 8-bit CPU. This was followed quickly by a 16-bit version called the 8086, from which we get the &amp;ldquo;86&amp;rdquo; in &amp;ldquo;x86&amp;rdquo;. The late 1980&amp;rsquo;s saw the first 32-bit CPU, the 80386, and many 32-bit redesigns were done; eventually a need to move to 64 bits arose, and so they created the &amp;ldquo;x86-64&amp;rdquo; extension (actually, AMD created it before Intel!</description>
    </item>
    
  </channel>
</rss>
