tag:blogger.com,1999:blog-5596076982515935402024-03-13T23:54:15.285-03:00The Idea Oublietteskwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.comBlogger36125tag:blogger.com,1999:blog-559607698251593540.post-50192360123302258932021-10-16T12:00:00.022-03:002021-10-16T12:00:00.191-03:00Emulator: System Calls<p>This post will cover some basic I/O system calls, enough to implement a game or two, other than sound support or holotape support. The holotape calls required a little more explanation, and the sound system data is more complex than for the calls covered here.</p><h2 style="text-align: left;">Prerequisites</h2><p>Hopefully you've read the <a href="https://ideaoubliette.blogspot.com/2021/10/emulator-basics-running-code.html">post on running code</a> in the emulator. It describes the easiest, fastest way to get your code running.</p><h2 style="text-align: left;">Console Calls</h2><h3 style="text-align: left;">In the Clear</h3><div>The CLEAR system call will remove all text and attributes from the screen, and set the cursor to top-left (0,0). </div><h3 style="text-align: left;">Character I/O</h3><p>The only console input system call is GETCH. It takes a byte off the stack as the blocking mode (=0 no blocking, != 0 blocking), grabs a key from the input queue and returns a 16-bit value indicating which character was pressed. If the MSB is 0 then the LSB contains the ASCII value.</p><p>There are two output calls, SETCH and PRINT. They both increment the cursor to the next character after their output is printed to screen at the current character. SETCH takes a single-byte ASCII character, whereas PRINT takes a null-terminated string starting at the location pointed to by the X register.</p><h3 style="text-align: left;">Cursor Control</h3><p>The cursor location consists of 16-bit X and Y coordinates, within the space of the coordinate space of the text screen.</p><p>To set the cursor, call SETCURSOR with the desired X and Y coordinates on the stack. If the operation worked, the byte 0 will be on top of the stack.</p><p>To get the current position of the cursor, call GETCURSOR. The X and Y coordinates will be on the top of the stack after executing this system call.</p><h3 style="text-align: left;">Screen Attributes</h3><p>Each character on the screen has an attribute. The current possible attributes are "dim" and "inverted." These are combined in a bit mask, where the second least-significant-bit represents the "dim" attribute, and the least-significant-bit represents "inverted."</p><p>SETATTR changes the default attribute for new characters written to screen. This does not change the attributes of any character, but any further characters will have these attributes.</p><p>SETATTRC sets the attributes on the character currently under the cursor. This does not affect the attributes of any subsequent character output.</p><h2 style="text-align: left;">Graphics Calls</h2><p>Use GRAPHICSTART to begin a graphics session. The value in X will be used as the starting address for the framebuffer, and the byte passed on the stack will be used to set the graphics mode. See the table below for the possible values of the mode byte.</p><p>On return, the system call places a byte on the stack. If the graphics mode is available, this byte is 0. If the byte describes a non-existent mode, or the mode requires more memory than is available to the system, then the byte is non-zero.</p><p>Depths less than 8 bpp store their values packed into a byte. For example, if using the 1 bpp mode, each byte of graphics memory will contain 8 pixels.</p><p>There is currently no blitter library yet, so it's a roll-your-own situation.</p><h2 style="text-align: left;">Table of System Calls</h2><p><span id="docs-internal-guid-704ee934-7fff-b275-0a29-630e50ef6eb9"></span></p><div align="left" dir="ltr" style="margin-left: 0pt;"><table style="border-collapse: collapse; border: none;"><colgroup><col width="154"></col><col width="204"></col><col width="119"></col><col width="124"></col></colgroup><tbody><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">GETCH</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Polls the keyboard for a key press, and returns the 16-bit value, ASCII in LSB if MSB is 0</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Blocking mode</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">0 if no character pressed and non-blocking, otherwise the key pressed</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">SETCH</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Prints a character at the text cursor position and increments the cursor</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Character</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">-</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">PRINT</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Prints a null-terminated string from X at the text cursor position and increments the cursor accordingly</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Null-terminated string starting at X</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">-</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">SETCURSOR</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Sets the current text cursor position</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">16-bit X and Y coordinates for the cursor</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">0 if valid</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">SETATTR</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Sets the current text attribute flags</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">16-bit field for text attribute flags</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">-</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">SETATTRC</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Sets the text attribute of the character under the cursor</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">16-bit field for text attribute flags</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">-</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">CLEAR</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Clears the screen of text and attributes, and sets the cursor to 0,0</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">-</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">-</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">GETCURSOR</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Gets the current text cursor position</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">-</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">16-bit X and Y coordinates for the cursor</span></p></td></tr></tbody></table><br /><span id="docs-internal-guid-21a466ef-7fff-2385-9d11-70be6448cce7"><div align="left" dir="ltr" style="margin-left: 0pt;"><table style="border-collapse: collapse; border: none;"><colgroup><col width="154"></col><col width="204"></col><col width="119"></col><col width="124"></col></colgroup><tbody><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">GRAPHICSTART</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">Begins a graphics session in the provided mode, with the framebuffer at the address in X. Can be called at any time, and will override the current graphics session, if any. Can be used for double buffering or animation.</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">Graphics mode</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">0 on success, error otherwise</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">GRAPHICEND</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">Ends all graphics sessions, returning to the text display</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">-</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">-</span></p></td></tr></tbody></table><h2>Graphics Mode Table</h2><div><span id="docs-internal-guid-a3a0ffa2-7fff-09f8-9ad6-5b5fa3194a2a"><div align="left" dir="ltr" style="margin-left: 0pt;"><table style="border-collapse: collapse; border: none; table-layout: fixed; width: 451.27559055118115pt;"><colgroup><col></col><col></col><col></col></colgroup><tbody><tr style="height: 0pt;"><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-top: solid #000000 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">Bits</span></p></td><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-top: solid #000000 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">Name</span></p></td><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-top: solid #000000 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">Possible values</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">6-4</span></p></td><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">Colour depth</span></p></td><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">000 = 1bpp</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">001 = 2bpp</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">010 = 4bpp</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">011 = 8bpp</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">1xx = reserved</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">3</span></p></td><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">Border enabled</span></p></td><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">0 = black border</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">1 = green border</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">(if applicable)</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">2-0</span></p></td><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">Resolution</span></p></td><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">000 = 120x80</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">001 = 192x128</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">010 = 240x160</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">011 = 320x240</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">100 = 480x320</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">101 = reserved</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">110 = reserved</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: Arial; font-size: 11pt; font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;">111 = reserved</span></p></td></tr></tbody></table></div></span></div></div></span></div>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com0tag:blogger.com,1999:blog-559607698251593540.post-52502918814392196402021-10-01T17:00:00.053-03:002021-10-13T17:35:11.635-03:00Emulator Basics - Running Code<p>Now that I've covered the instruction set, it's time to talk about the assembler and running your assembly programs. The assembler is available as a standalone tool, but is also bundled into the emulator, allowing you to go directly from assembly to running your code in one step.</p><h2 style="text-align: left;">Previous Posts</h2><p style="text-align: left;">The following posts cover the instruction set for the emulator. They can serve as a good resource once you decide to start writing code of your own.<br /></p><ul><li><a href="https://ideaoubliette.blogspot.com/2021/09/emulator-deep-dive-instruction-set-part.html">Instruction Set Part 1</a></li><li><a href="https://ideaoubliette.blogspot.com/2021/09/emulator-deep-dive-instruction-set-part_22.html">Instruction Set Part 2</a></li><li><a href="https://ideaoubliette.blogspot.com/2021/09/emulator-deep-dive-instruction-set-part_01818774798.html">Instruction Set Part 3</a></li><li><a href="https://ideaoubliette.blogspot.com/2021/09/emulator-deep-dive-instruction-set-part_0260532474.html">Instruction Set Part 4</a></li></ul><h2 style="text-align: left;">Setup</h2><p>If you haven't already, clone <a href="https://github.com/skwirl42/robco-processor">https://github.com/skwirl42/robco-processor</a> into the directory of your choice. At the moment only the macOS port is fully maintained, so the instructions will be focused on using the project on macOS.</p><h3 style="text-align: left;">Linux <br /></h3><p>I have yet to port it to linux, but that is planned. If you would like to work on it, there's <a href="https://github.com/skwirl42/robco-processor/issues/33" target="_blank">a task available</a> on the repository. Ideally, this should be straightforward. If you plan to work on the linux port, please let me know! It appears that homebrew is also available for linux, so that might be a good place to start.<br /></p><h3 style="text-align: left;">Prerequisites</h3><p>Make sure you have the latest XCode installed, along with its command line tools.</p><ul style="text-align: left;"><li>Install the latest CMake from <a href="https://cmake.org/download/">https://cmake.org/download/</a> <br /></li><li>Install homebrew from <a href="https://brew.sh">https://brew.sh</a> </li><li>Use homebrew to install boost, SDL2, and SDL2_image</li><ul><li><span style="background-color: black;"><span style="color: #04ff00;"><span style="font-family: courier;">$ brew install boost sdl2 sdl2_image</span></span></span></li></ul></ul><h3 style="text-align: left;">IDE <br /></h3><p>I use Visual Studio Code as my IDE, with the CMake extension installed, but if you're more comfortable with XCode projects, or Makefiles, configure CMake to use those project generators.</p><h3 style="text-align: left;">But CMake is ****!</h3><p>No, it really isn't. I enjoyed working with it, but if you get the chance to spend many, many hours making your own project using something else, then by all means, go for it. But this project uses CMake.</p><h3 style="text-align: left;">Build It</h3><p>At the moment you'll be looking to build the <span style="font-family: courier;">robcoterm</span> target. If you went the Visual Studio Code direction with no changes in setup, it should have built the executable into <span style="color: #04ff00;"><span style="background-color: black;"><span style="font-family: courier;"><project dir>/build/Debug/robcoterm</span></span></span>.</p><h2 style="text-align: left;">Running Code</h2><p>We'll start with a simple example program, the good old standard Hello World:</p><p></p>
<p><!--HTML generated using hilite.me--></p><div style="background: rgb(248, 248, 248) none repeat scroll 0% 0%; border-color: gray; border-image: none 100% / 1 / 0 stretch; border-style: solid; border-width: 0.1em 0.1em 0.1em 0.8em; border: medium solid gray; overflow: auto; padding: 0.2em 0.6em; width: auto;"><table><tbody><tr><td><pre style="line-height: 125%; margin: 0px;"> 1
2
3
4
5
6
7
8
9
10
11
12
13</pre></td><td><pre style="line-height: 125%; margin: 0px;">.include <span style="color: #ba2121;">"syscall.asm"</span>
.data HELLO_WORLD <span style="color: #ba2121;">"Hello, world!</span><span style="color: #bb6622; font-weight: bold;">\n</span><span style="color: #ba2121;">"</span> ; .data specifies data to be store in the executable
; In this case, it's the string to print
<span style="color: #a0a000;">start:</span>
pushiw HELLO_WORLD ; Put the address of the HELLO_WORLD string onto the stack
pullx ; Pull the top value on the stack into the X <span style="color: green; font-weight: bold;">register</span>
<span style="color: #a0a000;">print_string:</span>
syscall PRINT ; Call the system's PRINT routine (takes a null<span style="color: #666666;">-</span>terminated string
; pointed at by X, and prints it to the screen)
b print_string ; branch back to the label print_string to continuously write
; <span style="color: #ba2121;">"Hello, world!</span><span style="color: #bb6622; font-weight: bold;">\n</span><span style="color: #ba2121;">"</span> to the screen
</pre></td></tr></tbody></table></div>
<p></p>
<p>For now, just copy that into a file named <span style="font-family: courier;">hello_world.asm</span>, and run the following, replacing values in angle brackets to match the appropriate paths on your system:<br /></p><p style="margin-left: 40px; text-align: left;"><span style="font-family: courier;"><span style="background-color: black;"><span style="color: #04ff00;">$ <robocoterm> -I <project dir>/samples -S <hello_world.asm></span></span></span></p><p>If all went well, you should have something like the following appear:</p><p></p><div class="separator" style="clear: both; text-align: center;"><a href="https://1.bp.blogspot.com/-c4b3M9xMSi0/YVMPX7RwBBI/AAAAAAAABX0/BJlJZnxQZqwgnbzN9iUCXxwngdyVa-tgwCLcBGAsYHQ/s1184/robcoterm-helloworld.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="920" data-original-width="1184" height="249" src="https://1.bp.blogspot.com/-c4b3M9xMSi0/YVMPX7RwBBI/AAAAAAAABX0/BJlJZnxQZqwgnbzN9iUCXxwngdyVa-tgwCLcBGAsYHQ/s320/robcoterm-helloworld.png" width="320" /></a></div>There, you've run your first program in the emulator!<p></p><h2 style="text-align: left;">Samples <br /></h2><p>You can find more to run in the <span style="font-family: courier;">samples</span> directory inside the project. There are also files meant to be <span style="background-color: black;"><span style="color: #04ff00;"><span style="font-family: courier;">.include</span></span></span>d in that directory, and won't produce any useful output if run directly. <span style="font-family: courier;">echo_getstring.asm</span> and <span style="font-family: courier;">graphics_test.asm</span> can serve as a good jumping off points for inputting and outputting text, or working with graphics, respectively.</p><h2 style="text-align: left;">Next</h2><p>Next time I'll go over some useful system calls so you can try out some more complex patterns.</p><h2 style="text-align: left;">Other Posts in this Series</h2><ul style="text-align: left;"><li><a href="https://ideaoubliette.blogspot.com/2021/09/emulator-deep-dive-instruction-set-part.html">Instruction Set Part 1</a></li><li><a href="https://ideaoubliette.blogspot.com/2021/09/emulator-deep-dive-instruction-set-part_22.html">Instruction Set Part 2</a></li><li><a href="https://ideaoubliette.blogspot.com/2021/09/emulator-deep-dive-instruction-set-part_01818774798.html">Instruction Set Part 3</a></li><li><a href="https://ideaoubliette.blogspot.com/2021/09/emulator-deep-dive-instruction-set-part_0260532474.html">Instruction Set Part 4</a><br /></li></ul>
<p></p>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com0tag:blogger.com,1999:blog-559607698251593540.post-10350781086312136032021-09-29T12:00:00.002-03:002021-10-13T17:35:26.391-03:00Emulator Deep Dive - The Instruction Set: Part 4<p>This is the fourth part in this series, and will cover flow control instructions.</p><p>You can find <a href="https://ideaoubliette.blogspot.com/2021/09/emulator-deep-dive-instruction-set-part.html">the first post here</a>, <a href="https://ideaoubliette.blogspot.com/2021/09/emulator-deep-dive-instruction-set-part_01665854126.html">the second here</a>, and <a href="https://ideaoubliette.blogspot.com/2021/09/emulator-deep-dive-instruction-set-part_01818774798.html">the third here</a>.</p><h2 style="text-align: left;">Prerequisites</h2><p>None of the flow control operations use the data stack, and only two make use of the return address stack, so knowing about stacks is less important in this post than in the others. Knowledge of other assembly language variants would definitely be an asset, as these follow the same patterns found in other processors.</p><h2 style="text-align: left;">Last Time</h2><p>The last post covered arithmetic and logic unit (ALU) instructions, which modify the condition code (CC) register. Many of the flow control instructions make use of the CC flags to determine whether or not to move execution flow elsewhere.</p><h2 style="text-align: left;">Jumps</h2><p>Jump (<span style="font-family: courier;">jmp</span>, <span style="font-family: courier;">jsr</span>, <span style="font-family: courier;">rts</span>) instructions change the program counter (PC) to an absolute address in memory. They are all unconditional, that is, the change in the PC happens regardless of the system's state.</p><p><span style="font-family: courier;">jmp</span> changes the PC to an address specified as immediate operand to the instruction without side effects.</p><p><span style="font-family: courier;">jsr</span> changes the PC, but pushes the address of the next instruction after <span style="font-family: courier;">jsr</span> to the return address stack. This is paired with <span style="font-family: courier;">rts</span> which pulls the PC from the top of the return address stack. These allow for subroutine calls and returns and allow for more structured programming than <span style="font-family: courier;">jmp</span> or any of the branching instructions.</p><h2 style="text-align: left;">Branches</h2><p>Branch instructions use a single byte, twos-complement signed address offset as their operand. This allows for faster changes to the PC, as a single byte can be loaded faster by the CPU. Additionally, except for the unconditional <span style="font-family: courier;">b</span> branch, each branch instruction will check against some CC flag or flags.</p><h3 style="text-align: left;">Conditional Branches</h3><ul style="text-align: left;"><li><span style="font-family: courier;">beq</span> - branch on equal</li><ul><li>branches when the zero flag on the CC is set<br /></li></ul><li><span style="font-family: courier;">blt</span> - branch on less-than<br /></li><ul><li> branches when the negative flag on the CC is set<br /></li></ul><li><span style="font-family: courier;">ble</span> - branch on less-than-or-equal<br /></li><ul><li> branches when either the zero or negative CC flags are set<br /></li></ul><li><span style="font-family: courier;">bcr</span> - branch on carry<br /></li><ul><li> branches when the carry flag on the CC is set<br /></li></ul><li><span style="font-family: courier;">bov</span> - branch on overflow<br /></li><ul><li> branches when the overflow flag on the CC is set<br /></li></ul><li><span style="font-family: courier;">bdiv0</span> - branch on divde-by-zero<br /></li><ul><li> branches when the divide-by-zero flag on the CC is set</li></ul></ul><p>At the moment there is no branch-on-underflow instruction, or any greater-than branches. There's space to put them, but I haven't gotten around to it yet.<br /></p><h2 style="text-align: left;">The End?</h2><p>That concludes the instruction set portion of these deep dives. Next up is the assembler itself. Included will be the well loved Hello World! example, among others. Full knowledge of all the system calls is not necessary, each one used will be explained as it's used.<br /></p>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com0tag:blogger.com,1999:blog-559607698251593540.post-31904431002463852432021-09-25T12:00:00.118-03:002021-09-26T09:21:01.856-03:00Emulator Deep Dive - The Instruction Set Part 3<p>This is the third post in this series and will cover arithmetic and logic unit (ALU) instructions. The operations are pretty straightforward, and there are few caveats, if any. You can find a table of these instructions at the end of the post.</p><p>You can find <a href="https://ideaoubliette.blogspot.com/2021/09/emulator-deep-dive-instruction-set-part.html">the first post here</a>, <a href="https://ideaoubliette.blogspot.com/2021/09/emulator-deep-dive-instruction-set-part_01665854126.html">the second here</a>.</p><h2 style="text-align: left;">Prerequisites</h2><p>There are a couple of prerequisites to fully understanding this series of posts. It will assume you know what a stack is and that you have some knowledge of assembly language. But the content could still be interesting even without that knowledge. I'll leave it to you to decide.</p><h2 style="text-align: left;">Last Time</h2><p>In the last post I covered stack and memory manipulation instructions. Those instructions allowed for manipulation of the values on the stack; shuffling items around, adding items, and removing them. They can be combined with ALU instructions to produce a number of effects.</p><h2 style="text-align: left;">ALU instructions</h2><p>These instructions apply mathematical operators to values from the stack. ALU operations operate exclusively on values from the top of the stack, replacing them with the results of the operation. Each of the instructions can modify one of more flags from the condition code (CC) register.</p><p style="text-align: left;"><span style="font-family: inherit;">The current shortcomings are the lack of logical </span><span style="font-family: courier;">and/or</span><span style="font-family: inherit;">, and the lack of any </span><span style="font-family: courier;">xor</span><span style="font-family: inherit;"> instructions. This will be remedied in a future version of the emulator.</span></p><p>Like stack instructions, ALU instructions have single and double byte variants. The double byte versions are formed by adding a <span style="font-family: courier;">w</span> to the instruction mnemonic.</p><h2 style="text-align: left;">CC register</h2><p style="text-align: left;"><span><span style="font-variant-east-asian: normal; font-variant-numeric: normal; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: inherit;">The CC register contains the following flags:<br /></span></span></span></p><p></p><ul style="text-align: left;"><li><span style="white-space: pre-wrap;"><span style="font-family: courier;">overflow</span><span style="font-family: inherit;"> </span></span><span style="font-family: inherit; white-space: pre-wrap;">- the most recent multiplication operation would require more bits than are available for the current operation size</span></li><li><span style="white-space: pre-wrap;"><span style="font-family: courier;">negative</span><span style="font-family: inherit;"> </span></span><span style="font-family: inherit; white-space: pre-wrap;">- the result of the last operation was negative</span></li><li><span style="white-space: pre-wrap;"><span style="font-family: courier;">carry</span><span style="font-family: inherit;"> </span></span><span style="font-family: inherit; white-space: pre-wrap;">- the result of the last operation had a carry bit left over</span></li><li><span style="white-space: pre-wrap;"><span style="font-family: courier;">zero</span><span style="font-family: inherit;"> </span></span><span style="font-family: inherit; white-space: pre-wrap;">- the result of the last operation was zero</span></li><li><span style="white-space: pre-wrap;"><span style="font-family: courier;">underflow</span><span style="font-family: inherit;"> </span></span><span style="font-family: inherit; white-space: pre-wrap;">- the most recent division operation generated a result lower than 1, higher than -1, but not 0</span></li><li><span style="white-space: pre-wrap;"><span style="font-family: courier;">divide by 0</span><span style="font-family: inherit;"> -</span></span><span style="font-family: inherit; white-space: pre-wrap;"> the most recent division instruction attempted to divide a number by 0</span></li></ul><p></p><p></p><h2 style="text-align: left;">Next Time</h2><p>For the next post I'll cover the branching instructions. I'm guessing those will take the most explanation, so prepare for a longer post!</p><h2 style="text-align: left;">Instruction table</h2><p><span id="docs-internal-guid-e1d70bc3-7fff-862a-74dc-efe8e179aba8"></span></p><div align="left" dir="ltr" style="margin-left: 0pt;"><table style="border-collapse: collapse; border: medium none;"><colgroup><col width="104"></col><col width="122"></col><col width="298"></col><col width="77"></col></colgroup><tbody><tr style="height: 0pt;"><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Instruction</span></p></td><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Stack effect</span></p></td><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Description</span></p></td><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">CC</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">add</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">(a b -- a+b)</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Add a and b</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ZCN</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">sub</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">(a b -- a-b)</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Subtract b from a</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ZCN</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">mul</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">(a b -- a*b)</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Multiply a and b</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ZCNO</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">div</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">(a b - a/b)</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Integer division of a by b</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ZNDU</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">or (bitwise)</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">(a b -- a|b)</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Bitwise or a and b</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ZN</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">and (bitwise)</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">(a b -- a&b)</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Bitwise and a and b</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ZN</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">shl</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">(a b -- a shl b)</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">a is shifted left b bits, filling the vacated bits with 0</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ZC</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">shr</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">(a b -- a shr b)</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">a is shifted right b bits, filling the vacated bits with 0</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ZC</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">inc</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">(a -- a+1)</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Increments the contents of the top item on the stack</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ZCN</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">dec</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">(a -- a-1)</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Decrements the contents of the top item on the stack</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ZCN</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt 1pt 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">cmp</span></span></p></td><td style="border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt 1pt 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">(a b -- )</span></span></p></td><td style="border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt 1pt 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Sets:</span></p><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"></p><ul><li><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Z flag of CC to 1, N to 0 if identical,</span></li><li><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Z and N to 0 if a > b</span></li><li><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">N flag to 1 and Z to 0, if b > a</span></li></ul><p></p></td><td style="border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt 1pt 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ZN</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">mula</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: courier;">(a b c -- a*b+c)</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Multiplies a by b, then adds c</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ZCNO</span></p></td></tr></tbody></table></div>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com0tag:blogger.com,1999:blog-559607698251593540.post-6210133408359375382021-09-22T12:00:00.226-03:002021-09-22T15:05:18.584-03:00Emulator Deep Dive - The Instruction Set: Part 2<p>This is the second post in this series, and will cover stack manipulation instructions. You can find a table of all the stack instructions at the end of this post.</p><p>You can find <a href="https://ideaoubliette.blogspot.com/2021/09/emulator-deep-dive-instruction-set-part.html">the first post here</a>.<br /></p><h2 style="text-align: left;">Prerequisites</h2><p style="text-align: left;">There
are a couple of prerequisites to fully understanding this post. It will
assume you know what a stack is (but I've included a refresher) and that you have some knowledge of
assembly language. But the content could still be interesting even
without that knowledge. I'll leave it to you to decide.</p><h2 style="text-align: left;">Notation</h2><p style="text-align: left;">The table at the end of this post uses a stack effect notation typically used by <a href="https://en.wikipedia.org/wiki/Forth_(programming_language)">Forth</a>.
These effect notations are enclosed in parentheses, and consist of a
before state and an after state, separated by two dashes. For instance,
the <span style="font-family: courier;">swap</span> instruction exchanges the top two items on the stack. This would be noted as<span style="font-family: courier;"> (a b -- b a)</span>, showing that before the instruction is executed, <span style="font-family: courier;">b</span> is at the top of the stack, and <span style="font-family: courier;">a</span> is one below the top of the stack. After the execution <span style="font-family: courier;">a</span> is on the top of the stack and <span style="font-family: courier;">b</span> is one below the top.</p><h2 style="text-align: left;">Stacks</h2><p style="text-align: left;">A stack is a last-in, first-out data structure. The location of the last item added to it is called the top of the stack, and the number of items on the stack is the depth. Most stack instructions only operate on the top of the stack, but there are some exceptions, such as the <span style="font-family: courier;">roll</span> instructions.<br /></p><p style="text-align: left;">The emulator operates two 256-byte stacks: the data stack and the return address stack. Neither is directly accessible, but the data stack can be manipulated using the instructions covered in this post. Eventually, there will also be instructions to move or copy items from one of the stacks to the other, but this is as yet unimplemented. The main use for this functionality would be in implementing interpreted languages like Forth.<br /></p><h2 style="text-align: left;">Push-me Pull-you</h2><p style="text-align: left;">To push a value to a stack means to place a new value on top of the current stack. To pull, or pop, a value means to remove the value at the top of the stack. The RX-9000 instruction set contains a number of push/pull pairs, such as <span style="font-family: courier;">pushi/pop</span>, <span style="font-family: courier;">pushx/pullx</span>, etc.</p><p style="text-align: left;">While pulling a value that is larger than the depth of the stack is a logical error, the behaviour of such a pull is undefined. In the current implementation the stack pointer will end up rolling over, changing the depth of the stack and leaving the contents of the stack undefined.<br /></p><h2 style="text-align: left;">Value size</h2><p style="text-align: left;">In order to support both single and double byte values, the instruction mnemonic for a single byte value, like <span style="font-family: courier;">pushi</span>, is followed by a <span style="font-family: courier;">w</span> for two byte values. So to push an immediate one byte value you would use <span style="font-family: courier;">pushi</span>, and for a two byte value <span style="font-family: courier;">pushiw</span>.</p><p style="text-align: left;">The exceptions to this are when the size is implicit in the instruction, such as setting or retrieving a value in a register.<br /></p><h2 style="text-align: left;">Register/Stack transfers</h2><p style="text-align: left;">In order to set the <span style="font-family: courier;">DP</span> or <span style="font-family: courier;">X</span> registers, the desired value needs to be on the top of the stack. Then the <span style="font-family: courier;">pulldp</span> or <span style="font-family: courier;">pullx</span> instructions, respectively, take that value off the stack and store it in the respective register. <span style="font-family: courier;">pulldp</span> pulls a single byte from the stack, whereas <span style="font-family: courier;">pullx</span> pulls two bytes.</p><p style="text-align: left;">Alternatively, to place the value of either <span style="font-family: courier;">DP</span> or <span style="font-family: courier;">X</span> on the stack, you would use <span style="font-family: courier;">pushdp</span> or <span style="font-family: courier;">pushx</span> respectively.</p><h2 style="text-align: left;">Register indexed transfers (aka memory/stack transfers)</h2><p style="text-align: left;">This is perhaps the least intuitive part of the instruction set. I'll try to make it as clear as possible, but if you have any questions don't hesitate to ask them in the comments. <br /></p><p style="text-align: left;">The <span style="font-family: courier;">DP</span> or <span style="font-family: courier;">X</span> registers are required to move items between the stack and memory. In RX-9000 assembly this is noted with the register in square brackets, such as <span style="font-family: courier;">pull [DP]</span> to pop the top byte from the stack and place its value at the memory location pointed to by <span style="font-family: courier;">DP</span>. <span style="font-family: courier;">push [DP]</span> takes the byte pointed to by <span style="font-family: courier;">DP</span> and pushes it onto the top of the stack.</p><p style="text-align: left;">The width of the transfer can be expanded to two bytes by adding <span style="font-family: courier;">w</span> to either the <span style="font-family: courier;">push</span> or <span style="font-family: courier;">pull</span> instruction. The width of the register itself is irrelevant. If both <span style="font-family: courier;">DP</span> and <span style="font-family: courier;">X</span> contain the same value, <span style="font-family: courier;">push [DP]</span> is equivalent to <span style="font-family: courier;">push [X]</span>.</p><p style="text-align: left;">In addition, the register used can be either decremented or incremented, either before or after the operation takes place. This change can either be by one byte or two. For instance, to put the value at <span style="font-family: courier;">DP</span> on top of the stack, and then increment <span style="font-family: courier;">DP</span> by one byte, you would write <span style="font-family: courier;">push [DP+]</span>. In order to increment by two bytes, you would write <span style="font-family: courier;">push [DP++]<span style="font-family: georgia;">. This allows both <span style="font-family: courier;">DP</span> and <span style="font-family: courier;">X</span> to be used as stack pointers as well, and allows for easy array access through these registers.</span></span></p><h2 style="text-align: left;"><span style="font-family: courier;"><span style="font-family: georgia;">What next?</span></span></h2><p style="text-align: left;"><span><span><span style="font-family: inherit;">I plan to cover arithmetic and logic unit (ALU) instructions in the next post. These instructions operate only on items at the top of the stack and include addition, subtraction, logical </span><span style="font-family: courier;">AND</span><span style="font-family: inherit;">, among others.</span><br /></span></span></p><h2 style="text-align: left;">Instruction table</h2><p style="text-align: left;">Each of these instructions is listed with its single byte variant, but any of these instructions can have a <span style="font-family: courier;">w</span> added to them to cause them to operate on two byte values instead. The exceptions to this are the <span style="font-family: courier;">pulldp/pushdp/pullx/pushx</span> instructions, whose bit counts are implicit.</p><p style="text-align: left;">Added to the tables of instructions involving the registers are the condition register flags that can be changed by the operation. The condition code (CC) register will be explained further in the post on ALU operations.<br /></p><h3 dir="ltr" id="docs-internal-guid-47044424-7fff-a5b3-4411-6fa5fc10e9e5" style="line-height: 1.38; margin-bottom: 4pt; margin-top: 16pt;"><span style="background-color: transparent; color: #434343; font-family: inherit; font-size: 14pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Stack manipulation</span></h3><div align="left" dir="ltr" style="margin-left: 0pt;"><table style="border-collapse: collapse; border: none;"><colgroup><col width="87"></col><col width="193"></col><col width="321"></col></colgroup><tbody><tr style="height: 0pt;"><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Instruction</span></p></td><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Stack effect</span></p></td><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Description</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">pushi</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">( -- i)</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Pushes the immediate value to the stack. The immediate byte or word value follows the instruction.</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">pop</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">(a -- )</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Removes the top item on the stack, discarding it</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">dup</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">(a -- a a)</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Duplicates the top item on the stack</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">swap</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">(a b -- b a)</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Exchanges the top two items on the stack</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">roll</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">(a item[0] item[1] ... item[a] -- item[a] item[0] item[1] ...)</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Moves an item ‘a’ items deep in the stack to the top of the stack</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">depth</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">( -- d)</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Pushes the number of bytes on the data stack, not including the newly pushed byte.</span></p></td></tr></tbody></table></div><h2 style="line-height: 1.38; margin-bottom: 4pt; margin-top: 16pt; text-align: left;"><span style="background-color: transparent; color: #434343; font-family: inherit; font-size: 14pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Register manipulation</span></h2><div align="left" dir="ltr" style="margin-left: 0pt;"><table style="border-collapse: collapse; border: none;"><colgroup><col width="111"></col><col width="153"></col><col width="242"></col><col width="94"></col></colgroup><tbody><tr style="height: 0pt;"><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Instruction</span></p></td><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Stack effect</span></p></td><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Description</span></p></td><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">CC</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">pushdp</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">( -- DP)</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Pushes the byte value of DP onto the stack</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ZN</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">pushx</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">( -- X)</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Pushes the word value of X onto the stack</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ZN</span></p></td></tr></tbody></table></div><br /><div align="left" dir="ltr" style="margin-left: 0pt;"><table style="border-collapse: collapse; border: none;"><colgroup><col width="111"></col><col width="154"></col><col width="240"></col><col width="96"></col></colgroup><tbody><tr style="height: 0pt;"><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Instruction</span></p></td><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Stack effect</span></p></td><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Description</span></p></td><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">CC</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">pulldp</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">(a -- ) a -> DP</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Pulls the top byte from the stack and puts it in DP</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ZN</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">pullx</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">(a -- ) a -> X</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Pulls the top word from the stack and puts it in X</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ZN</span></p></td></tr></tbody></table></div><h3 style="line-height: 1.38; margin-bottom: 4pt; margin-top: 16pt; text-align: left;"><span style="background-color: transparent; color: #434343; font-family: inherit; font-size: 14pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Register indexed</span></h3><p dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">These instructions support pre/post-increment/decrements.</span></p><div align="left" dir="ltr" style="margin-left: 0pt;"><table style="border-collapse: collapse; border: none;"><colgroup><col width="111"></col><col width="153"></col><col width="242"></col><col width="94"></col></colgroup><tbody><tr style="height: 0pt;"><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Instruction</span></p></td><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Stack effect</span></p></td><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Description</span></p></td><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">CC</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">push [dp]</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">( -- [DP])</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Pushes the value at DP onto the stack</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ZN</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">push [x]</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">( -- [X])</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Pushes the value at X onto the stack</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ZN</span></p></td></tr></tbody></table></div><br /><div align="left" dir="ltr" style="margin-left: 0pt;"><table style="border-collapse: collapse; border: none;"><colgroup><col width="111"></col><col width="154"></col><col width="240"></col><col width="96"></col></colgroup><tbody><tr style="height: 0pt;"><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Instruction</span></p></td><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Stack effect</span></p></td><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Description</span></p></td><td style="background-color: #d9d9d9; border-bottom: solid #000000 1.5pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1.5pt; border-right: solid #000000 1.5pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt; text-align: center;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">CC</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">pull [dp]</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">(a -- ) a -> [DP]</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Pulls the top value from the stack and places it at DP</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1.5pt; border-width: 1.5pt 1pt 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ZN</span></p></td></tr><tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">pull [x]</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="font-family: courier;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">(a -- ) a -> [X]</span></span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Pulls the top value from the stack and places it at X</span></p></td><td style="border-bottom: solid #000000 1pt; border-color: rgb(0, 0, 0); border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-style: solid; border-top: solid #000000 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;"><p dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;"><span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">ZN</span></p></td></tr></tbody></table></div>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com0tag:blogger.com,1999:blog-559607698251593540.post-18120374794325630852021-09-18T12:00:00.002-03:002021-09-22T15:00:41.729-03:00Emulator Deep Dive - The Instruction Set: Part 1<p>I thought some of you might appreciate hearing about the internals of my emulator. In this post I'm going to introduce the instruction set, and cover the emulated memory model and registers. This is just the first post in this series, and will cover miscellaneous instructions. I'm keeping each post small, for easy digestibility.<br /></p><h2 style="text-align: left;">Prerequisites</h2><p>There are a couple of prerequisites to fully understanding this post. It will assume you know what a stack is and that you have some knowledge of assembly language. But the content could still be interesting even without that knowledge. I'll leave it to you to decide.<br /></p><h2 style="text-align: left;">Registers/Memories</h2><p>Most instructions involve the 256-byte data stack. There's also a 256-byte return stack to allow for subroutine returns. These stacks each have a stack pointer register that is not user accessible.<br /></p><p>Addressable memory consists of 64KB of RAM, divided into the direct-page's 256 bytes at the beginning of memory, and then the remaining 64KB - 256 byte memory. <br /></p><p>There are two directly user-accessible registers, DP and X. These offer the only means of accessing RAM, through register indexed access.<br /></p><p>DP is an 8-bit register meant to serve as an index into the direct page. It offers pre- and post-decrement on store/read, but can also be used as a general purpose, 8-bit register.</p><p>X is a 16-bit register meant to serve as an index into the entirety of the 64KB of memory. It offers pre- and post-decrement on store/read, but can also be used as a general purpose register.</p><p>The remaining registers, CC and PC, are the condition and program counter registers, respectively. They are not directly user accessible, but affect, and are affected by, the operation of certain instructions. This will be discussed in future posts.</p><h2 style="text-align: left;">Instruction Types</h2><p>There are four types of instructions available to programmers:</p><ul style="text-align: left;"><li>Stack instructions - instructions that add to or remove items from the stack, or otherwise manipulate the positions of items on the stack</li><li>ALU instructions - instructions that perform operations on the items at the top of the stack, such as addition, subtraction, or logic operations</li><li>Flow control instructions - instructions that affect the program counter to change the execution flow of a program</li><li>Miscellaneous instructions - instructions not falling into the other three categories, and the subject of this post<br /></li></ul><h2 style="text-align: left;">Miscellaneous Instructions</h2><p>There are two miscellaneous instructions, SYSCALL, which triggers a system call, specified by its single byte operand, and SYNC, which exits the instruction execution to synchronize with the rest of the emulator loop.</p><p>SYSCALLs often require parameters, which are passed on the stack. The list of system calls is available in the source tree, under <span style="font-family: courier;">source/include/syscall.h</span>. I'll be writing up another post in the future on the parameters and operation of different syscalls.</p><p>SYNC will interrupt instruction execution and allow the rest of the emulator's main loop to process. This was mainly intended to update the bitmapped screen from the emulated memory to the SDL window displaying the image.</p><p>SYSCALL also interrupts instruction execution in order to execute the host-side code that implements the system call. In essence, SYNC acts as a NOP syscall, since it interrupts instruction execution, but doesn't execute any code.</p><h2 style="text-align: left;">Next Up</h2><p>The <a href="https://ideaoubliette.blogspot.com/2021/09/emulator-deep-dive-instruction-set-part_22.html">next article</a> will focus on stack instructions; that is, instructions which manipulate the items on the stack without arithmetic or logic operations. This includes adding to and removing from the stack, moving items around on the stack, and setting or saving the DP and X registers.<br /></p>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com0tag:blogger.com,1999:blog-559607698251593540.post-91501904216636124982021-09-14T15:25:00.001-03:002021-09-21T12:03:24.327-03:00RobCo RX-9000<h2 style="text-align: left;">Intro</h2><p> For over a year, I've been working on a project to implement an <a href="https://github.com/skwirl42/robcorobco-processor/" target="_blank">emulator</a><a href="https://github.com/skwirl42/robcorobco-processor/" target="_blank"> (<span style="font-family: courier;">https://github.com/skwirl42/robcorobco-processor/</span>)</a> of a hypothetical RobCo RX-9000 computer from the Fallout universe. I've wanted to create a fantasy computer for some time, and the thought occurred to me that this would be great complement to a <a href="https://youtu.be/SKd5g4FzJQE" target="_blank">hardware project</a> from element14 I've been working on.</p><p>At some point I lost steam with the project, and it's sat dormant for 8 months as of this writing. It's a labour of love that I didn't have energy for anymore. That might change in the future, if I can drum up some interest in it.</p><p>I've spent a lot of time putting this together, and I'm pretty proud of it. I hope you can find ways to enjoy it, too!</p><h2 style="text-align: left;">Features</h2><h3 style="text-align: left;">Emulator</h3><p>The emulator implements a 16-bit, 256 byte stack-driven instruction set, with an additional 64KB of RAM. Its peripherals include: a text console, bitmapped graphics mode, a virtual holotape interface, and an FM synthesis sound system. There are other peripherals to be developed.</p><p>Much of the IO interaction is done through system calls, using the SYSCALL instruction. This abstracts a lot of the system for the programmer. I wanted to be able to implement these calls on the host side, in C/C++ .</p><p>The emulator could easily be used to run games, at this point. If there were any. I'm hoping this post might drum up some interest. I've made the tools to be sufficiently sophisticated so that I could implement assembly programs pretty easily.</p><p>There's a very basic debugger in the emulator, allowing the user to step through instructions. Also included is a setup screen for loading holotapes from the host filesystem.</p><h3 style="text-align: left;">Assembler</h3><p>The toolset includes a single-pass assembler that can be used to run assembly source directly in the emulator, or as a standalone command line tool.</p><p>There is no macro support in the assembler, as I haven't gotten around to implementing it. I'd be happy not to have to, if someone decides to help out.</p><p>The assembler's parser is based on the boost's spirit library, and should be pretty extensible. The backend is in straight C, and I'm sure it has some serious bugs.</p><h3 style="text-align: left;">Other tools</h3><p>The most useful of the command line tools is the tapemanager. It creates, clears, and adds files to holotape images for use with the emulator.</p><p>There are a couple of tools for interacting with the sound system in a standalone manner. One is a kind of piano, and the other plays back sound commands from a file. I'm not a musician, so the sound system hasn't had a lot of testing outside of the piano tool.</p><h2 style="text-align: left;">Reasoning</h2><p style="text-align: left;">Ultimately, this system was designed to create a system from an unspecified architecture for a fictional computer. Choices were usually made for in-universe reasons, or when those became cumbersome, I chose more sensible, real-world functionality.</p><h3 style="text-align: left;">Why stack-based?</h3><p style="text-align: left;">Given that I couldn't find any reference to actual systems architecture for Fallout terminals I decided to simply go with something different, since the Fallout universe is an alternate universe, with the split happening before the minicomputer was popularized. Plus, the in-universe machines that pre-dated the one I've created were all dumb terminals. A small, stack-based system would most likely be enough for those machines.</p><p style="text-align: left;">Another reason is that it makes implementing languages like Forth easy, more or less. I've extended the original architecture to make it easy to implement Forth with few instructions needed per word.</p><h3 style="text-align: left;">Why so many SYSCALLs?</h3><p>My idea for the system was that it was essentially a hacked dumb terminal, thrown together quickly to meet consumer demand and potential competition. So in-universe, RobCo had all these dumb terminals, and with a bit of jiggering they could make a better computer with mostly just a change of processor. The SYSCALLs are meant to be the programming models of the older, 8-bit terminals, simply extended for use with the new hardware.</p><h2 style="text-align: left;">Future plans</h2><p>I'd love to see a community build up around this strange little system. I'd like to be able to work on it knowing someone else is going to be enjoying what I'm making. I'd love to see games made by other people.</p><p>There's lots of room for improvement. The assembler has some serious flaws that I'm aware of, and the debugging interface for the emulator could do with being a little more comprehensive.</p><p>This is a project I've put a lot of time and love into. It's my largest personal project to date, and it's given me a good feeling of accomplishment. I hope you've enjoyed reading about it, and maybe you'll want to join the effort!</p>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com0tag:blogger.com,1999:blog-559607698251593540.post-58012256607685966512021-08-19T08:27:00.000-03:002021-09-15T07:08:41.665-03:00Yeah, been a while<p> It'd been quite a while since I'd been here. I know this because there was an unfinished post sitting here from 2012, which has since been published, about my trip to Prague, specifically the 12 hour layover in Amsterdam. I published it without finishing it, because the trip wasn't as fresh in my mind, having been over 9 years ago.</p><p>I may start posting here more often, or <a href="https://www.instagram.com/skwirl42/" target="_blank">on Instagram</a> if it's more pictures than text. I'm taking a course on outdoor art and documentation, so I might put some of that content here.</p><p>Things have been all over the place since my last post. My wife and I separated; I had a couple of long depressive episodes; I taught a game development course at Acadia University; I changed jobs a few times; I took courses in book binding and adult education. There's a lot than can fit into 9.5 years.</p>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com0tag:blogger.com,1999:blog-559607698251593540.post-40578146499673753622021-08-17T19:50:00.001-03:002021-09-15T07:09:23.364-03:00<img alt="" border="0" id="BLOGGER_PHOTO_ID_5690414868280129730" src="http://3.bp.blogspot.com/-7tJYHwMUh-g/TvhqLHBwOMI/AAAAAAAAAGI/JkiyDX2KgkI/s320/Van%2BGogh%2Bmuseum%2Bwindows.jpg" style="cursor: pointer; float: right; height: 240px; margin: 0px 0px 10px 10px; width: 320px;" /><span class="Apple-style-span" style="-webkit-text-decorations-in-effect: none; color: black; font-family: verdana;">A Day in Amsterdam</span><div><div><a href="http://1.bp.blogspot.com/-Q7kUF0f32m0/TvhnwMpe6WI/AAAAAAAAAFM/uGH_S4YGuDQ/s1600/Lunch%2Btable%2B-%2BDam%2BPlaza%2BRestaurant.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}">
</a></div><div>Taking a flight from Halifax to Prague, I was provided an opportunity to visit Amsterdam, seeing as I had a 12 hour layover there before the final leg of my voyage. It was a beautiful city and I'm glad I got the chance to see it.</div><div>
</div><div>I arrived pretty early in the morning, on Christmas Day. My first stop was the Museumplein and the Rijksmuseum. It was very early, and so nothing was open at all. I took the time to walk around the Museumplein and some of the surrounding streets while I waited for everything to open. It was a nice walk and a comfortable 8°C, making for a nice change from the heat of the plane, terminal and bus. Ravens were cawing and pigeons tried to beg food off me. I didn't have any, so they were out of luck.</div><img alt="" border="0" id="BLOGGER_PHOTO_ID_5690412206909221218" src="http://1.bp.blogspot.com/-Q7kUF0f32m0/TvhnwMpe6WI/AAAAAAAAAFM/uGH_S4YGuDQ/s320/Lunch%2Btable%2B-%2BDam%2BPlaza%2BRestaurant.jpg" style="cursor: pointer; float: right; height: 320px; margin: 0px 0px 10px 10px; width: 240px;" /><font class="Apple-style-span" face="verdana"><font class="Apple-style-span" size="large">
</font></font><div>
</div><div><a href="http://1.bp.blogspot.com/-MsXRN01wL8E/TvhqKtRgcsI/AAAAAAAAAF4/b4udauHbPjg/s1600/Reijksmuseum%2BExit%2BGate.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5690414861366883010" src="http://1.bp.blogspot.com/-MsXRN01wL8E/TvhqKtRgcsI/AAAAAAAAAF4/b4udauHbPjg/s320/Reijksmuseum%2BExit%2BGate.jpg" style="cursor: pointer; float: right; height: 320px; margin-bottom: 10px; margin-left: 10px; margin-right: 0px; margin-top: 0px; margin: 0px 0px 10px 10px; width: 240px;" /></a>
<a href="http://1.bp.blogspot.com/-XAFFVu-ZtYM/TvhqKQEhp_I/AAAAAAAAAFo/WehdNHCm4XA/s1600/Reijksmuseum%2BEntrance%2BGate.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5690414853527807986" src="http://1.bp.blogspot.com/-XAFFVu-ZtYM/TvhqKQEhp_I/AAAAAAAAAFo/WehdNHCm4XA/s320/Reijksmuseum%2BEntrance%2BGate.jpg" style="cursor: pointer; float: right; height: 240px; margin-bottom: 10px; margin-left: 10px; margin-right: 0px; margin-top: 0px; margin: 0px 0px 10px 10px; width: 320px;" /></a>
<div>
</div><a href="http://2.bp.blogspot.com/-zQ12ggIjmpo/TvhnwNeLKqI/AAAAAAAAAFU/96aRp2dW4F0/s1600/National%2BMonument.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5690412207130225314" src="http://2.bp.blogspot.com/-zQ12ggIjmpo/TvhnwNeLKqI/AAAAAAAAAFU/96aRp2dW4F0/s320/National%2BMonument.jpg" style="cursor: pointer; float: right; height: 320px; margin-bottom: 10px; margin-left: 10px; margin-right: 0px; margin-top: 0px; margin: 0px 0px 10px 10px; width: 240px;" /></a></div><div><a href="http://2.bp.blogspot.com/-zQ12ggIjmpo/TvhnwNeLKqI/AAAAAAAAAFU/96aRp2dW4F0/s1600/National%2BMonument.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"></a><font class="Apple-style-span" color="#0000EE"><u>
</u></font><a href="http://4.bp.blogspot.com/-oyccgjBVMJ0/Tvhnvn_3aWI/AAAAAAAAAFE/Wgd8QqO6wmc/s1600/Cobbles.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5690412197070989666" src="http://4.bp.blogspot.com/-oyccgjBVMJ0/Tvhnvn_3aWI/AAAAAAAAAFE/Wgd8QqO6wmc/s320/Cobbles.jpg" style="cursor: pointer; float: right; height: 320px; margin: 0px 0px 10px 10px; width: 240px;" /></a>
<a href="http://1.bp.blogspot.com/-Hdu0LJhiUME/TvhnvWYR0eI/AAAAAAAAAE0/t2daxgV5qFQ/s1600/Christmas%2Bat%2Bthe%2BMuseumplein.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5690412192341545442" src="http://1.bp.blogspot.com/-Hdu0LJhiUME/TvhnvWYR0eI/AAAAAAAAAE0/t2daxgV5qFQ/s320/Christmas%2Bat%2Bthe%2BMuseumplein.jpg" style="cursor: pointer; float: right; height: 240px; margin: 0px 0px 10px 10px; width: 320px;" /></a>
<a href="http://4.bp.blogspot.com/-qp5RviNY2dw/TvhnvV2k6-I/AAAAAAAAAEs/b1V3VEZQ_bs/s1600/Amsterdam%2BCentral%2BStation.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5690412192200190946" src="http://4.bp.blogspot.com/-qp5RviNY2dw/TvhnvV2k6-I/AAAAAAAAAEs/b1V3VEZQ_bs/s320/Amsterdam%2BCentral%2BStation.jpg" style="cursor: pointer; float: right; height: 240px; margin: 0px 0px 10px 10px; width: 320px;" /></a>
</div></div><div><a href="http://2.bp.blogspot.com/-Z5WrZgOPp1o/TvhqK6JEIzI/AAAAAAAAAGA/f5Vg8zLOj-k/s1600/Reijksmuseum.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5690414864821134130" src="http://2.bp.blogspot.com/-Z5WrZgOPp1o/TvhqK6JEIzI/AAAAAAAAAGA/f5Vg8zLOj-k/s320/Reijksmuseum.jpg" style="cursor: pointer; float: right; height: 240px; margin-bottom: 10px; margin-left: 10px; margin-right: 0px; margin-top: 0px; margin: 0px 0px 10px 10px; width: 320px;" /></a></div><div>
</div>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com0tag:blogger.com,1999:blog-559607698251593540.post-83562288563956707992011-03-15T09:38:00.004-03:002011-03-15T09:50:14.052-03:00Oops… I disappeared!<span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: medium;">Yep, been a long, long time since I last posted. Over a year! A lot's happened in the past year; kinda crazy.</span></span><div><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: medium;">First, I'd like to thank <a href="http://unstranger.wordpress.com/">Unstranger</a> for his comment on my SpaceRat post. I'd like to think I'm a decent writer, and if at least one person found it readable from a non-tech perspective, then so much the better!</span></span></div><div><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: medium;">In late October the Mrs and I moved to Halifax, and I got a job writing code for a video game company. Oh yes, the dream has come true. :D I'm loving the work and apparently they're loving my performance! I started off on contract and just recently got hired on permanently. The raise that came along was great too. ;)</span></span></div><div><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: medium;">What else… what else… The Mrs and I came out as polyamorous to our families. It wasn't a smooth ride and it still isn't for some of them. But all in all, how each of us reacts to things is our own cross to bear and we can't expect others to react in particular ways, even if we'd like them to.</span></span></div><div><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: medium;">I turn 33 tomorrow, and so I took the week off work. That's why I'm here; I have some spare time. Even if you love the work you need to take a break at some point.</span></span></div><div><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: medium;">We got a new puppy just before moving here. He's a bug-eyed little monster that we love anyway. Hehehe. He loves tormenting his older brother and barking at things. Silly dog.</span></span></div><div><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:verdana;"><span class="Apple-style-span" style="font-size: medium;">I think that'll be it for now. If I think of something else in the next little bit I'll post it. If I have the time. Now to try and get myself to work on a secret project I started last summer and have yet to complete!</span></span></div>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com0tag:blogger.com,1999:blog-559607698251593540.post-63745825466026497892010-02-18T12:44:00.001-04:002010-02-18T12:44:20.240-04:00The SnowThere has been a snow storm. It wasn't as bad as the forecast had made it out to be. The wind blew the snow around into big drifts, leaving some parts largely uncovered by new snow. <br /><br />At some point I have to clear the driveway of this snow. It's begun to melt, since the temperatures have risen above freezing. They're going to keep rising over the next couple of days. <br /><br />Wet snow does not clear easily. A snowblower can't manage it very well and it's quite heavy to shovel. However, the fact that it's in drifts may make shoveling easier. I can hope, anyway, because the snowblower won't work well on the snow as it is right now. <br /><br />300 feet of driveway is a pain to clear. But I think the natural beauty we have is worth the inconvenience of a bit of snow part of the year. At least we have nowhere to go at the moment. <br /><br /><br /><br />skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com1tag:blogger.com,1999:blog-559607698251593540.post-40157404487536198142010-01-29T10:52:00.001-04:002010-01-29T10:52:17.192-04:00Another postIt's been over a week since I've posted here, and I apologize to my loyal readers who have probably all headed to the hills. <br /><br />Twitter has been keeping me distracted, while my bipolar disorder and newly-diagnosed ADHD have left me feeling less than effective. It's hard to push yourself to try to succeed when you feel you've been so far from stellar that bothering with anything is a waste of time. <br /><br />But things are picking up. I'm on new medication, I have great friends, an incredibly supportive wife and a window into new techniques to help keep my problems in check. There's definitely a gleam of hope where a short while ago there was none. <br /><br />I'd love to find employment, but my chosen field of expertise, software development, seems to be yielding little, if any, job prospects in the area. I can always cast out a wider net in my search, since so far I've only looked at Nova Scotia. However New Brunswick and PEI are both a stone's throw away. PEI is apparently the game development capitol of the Maritimes, and it's a field that's interested me since I first learned to program as a kid. I guess it might have been what drove me to begin learning. <br /><br />A bright light is on the horizon, and I'm heading into it. If you come across a job posting that might suit me, let me know. For now I'll keep charting a course towards a brighter future. <br />skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com0tag:blogger.com,1999:blog-559607698251593540.post-14920781363290995702010-01-19T12:30:00.000-04:002010-01-19T12:31:22.993-04:00Direction - I Haz It?<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Yep, I know what I wrote in <a href="http://ideaoubliette.blogspot.com/2009/09/if-i-grow-up.html">If I Grow Up</a>… I had a direction and I wanted to follow it. I’ve been thinking about it a lot. I want to write, I love to write, I’m going to write. But do I want to make a living off of it? Perhaps I just want to do it for fun.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">There’s a bit of a problem with this, in that I crave something to do. The most lucrative thing I can think of is developing software. I like doing it, and I tend to do it anyway, just like writing. There’s at least one project that’s really got me interested, and I’m sure I can cook up more ideas when I’ve finished it.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS"><b>Finishing What I Start!</b> It’s always been a bit of an issue for me. I’m just going to have to try harder to stay on target and not lose steam before I’m done. I’ll have to nail down my requirements and feature list well before I start coding, and freeze those requirements for version 1.0. There’s always room for improvement later on, and if the first version isn’t solid, what kind of a message does that send to users?</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS"><b>Polish It!</b> Polish is one thing I’ve had trouble with in the past on my personal projects. I tend to get some small details down really nicely, but the overall product is something I’ll have to pay a lot more attention to. If I need to pay someone for a good set of icons, I’m going to have to shell out for it and not balk at the expense. Polish is key to a product that sells and encourages word of mouth.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS"><b>Marketing?</b> Yep, another part of the process I’ll need to deal with and pay for. It’s inevitable if you want to push a product and make it popular. This is especially true with the iPhone OS App Store being flooded with cheap or free apps. You’ve got to sell your product in a way that justifies a cost high enough that it doesn’t leave you without suitable return on your investment. In-app advertising is, as far as I’m concerned, not the kind of thing I’d want to rely on. A lot of the apps I’ve seen use the same advertising services, and the same products get flogged across the apps the consumer uses. It also cheapens the user experience. I’d rather make a feature-limited free version than a full version with ads.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS"><b>Platform?</b> I’ve always been a Mac guy, so the iPhone OS and Mac OS X platforms are a shoe-in. If I write any utilities I’d likely create a Mac and iPhone OS version with some way to synchronize between the two. The App Store is a bit of a sticking point, but having a way of simplifying distribution, payment and updatings of at least the iPhone half of a product would be great.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS"><b>Product Types.</b> Ideally I’d like to write small utilities that help make people’s lives easier, as well as small casual games. While I’m confident in my ability to produce a polished product in the first category with little external help, I’d definitely need someone external for graphics and sound for any decently polished game.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">That’s what I’m looking at right now. I’ll still be writing here, hopefully with the original frequency I had in mind for my blog. I don’t think it’s healthy for me to let things distract me from writing, and I’m going to make a more solid effort to give myself time to write. I’ve been terrible lately, spending way too much time on twitter. The people are great, and I think that’s part of what’s got me stuck to it.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">I suppose I should get to writing up a requirements document for that utility I’ve got in mind!</p>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com0tag:blogger.com,1999:blog-559607698251593540.post-80001954165448757102010-01-07T12:42:00.002-04:002010-01-07T17:29:22.390-04:00English Journey in Jeopardy?<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">UPDATED!</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS"><br /></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">It seems almost certain that Sophie will be getting laid off at the beginning of next month. As such, my trip to the UK is nixed, unless I get some sort of windfall of cash.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS"><b>Layoff plans</b></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">In order to cover expenses, and possibly have some money left over for the trip, I’ll be looking at getting a part-time job. With my constant headaches and the possibility of depression, I’d have to get something pretty stress free, and not in a noisy environment. I’m not entirely confident in my ability to show up to work every day.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Our income would be significantly reduced, so a lot of what I make from a part-time job would go to bills and such. Part-time is definitely about the limit I could handle.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS"><b>Implications</b></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px">There will be no trip, as it stands.</p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">The primary implication is that I might not be able to buy my plane ticket. I think that’ll be the single biggest expense of my trip. Food is probably next, and I *was* a university student on a budget, so I know how to keep from overspending there. Then it’s lodging. I can’t go any less expensive than hostels, unless I sleep in a cardboard box or on a park bench. Yeah, that’s not happening. Train and bus fare shouldn’t be much, and I’ll walk whenever I can.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS"><b>Where does this leave me?</b></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">I’m hoping this wont leave me in a situation where I can’t make the trip. My dad needs dates so he can start booking air travel for himself to and from Belgium, and my return ticket from there. If I get a part-time job, I should be all set with respect to money. If I can’t hold it, well, we’ll have to see from there.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">I don’t want to let my tweeples down, the ones I’ve told about the trip. I want to see you guys and I’ll do everything in my power to get there. If you can find me info on how much it costs in London, Liverpool and Edinburgh to eat modestly per day, that’d help quite a bit.</p>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com3tag:blogger.com,1999:blog-559607698251593540.post-12219674565431170782009-12-30T11:27:00.000-04:002009-12-30T11:28:28.861-04:00Am I Jonesing for the Internet?<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">I’m feeling a little agitated and jittery today. My internet access is down due to some nasty snow and wind. Are the two related? They might be. I know I’m certainly missing my twitter friends and feeling less in touch with the world.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">How long is this weather going to hold? I can’t look that up. Sure, I could pull out a radio and listen in, if I had one. I might somewhere, but I’m at the mercy of the broadcaster to decide when to report the weather and how much of it to report.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Some argue that internet access should be a basic human right. Does this point of view hold water? I suppose it could be argued that since the internet allows us to draw together into a larger community that it is an essential part of improving the human condition. Its use in political organizing and to connect dissidents in repressive regimes can certainly help make the case for it as a basic human right.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Is the jitteriness really from not having the internet? My doctor did just increase my dose of modafinil, and my body might be reacting to the increase in alertness and stimulation. Last time I was off the net for a while I didn’t jones like this, so maybe it is indeed the medication. I’m not sure.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">But am I just trying to justify an unhealthy dependence on the internet? Perhaps. I’m isolated due to my lack of driver’s license and rural location, however, and rarely have any sort of other connection to humanity. Apart from Sophie, that is. So is my reliance on the internet unhealthy? I can’t give you a real answer to that. All I know is that right now I feel a need to connect with good friends and inform myself about the world. I can’t say that that’s entirely unhealthy.</p>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com1tag:blogger.com,1999:blog-559607698251593540.post-32065596035926674842009-12-11T08:00:00.000-04:002009-12-11T08:00:03.418-04:00Empathy and Schadenfreude<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Empathy is the ability to look at another person, see their emotions and experience a sympathetic emotional response. It’s an ability present in humans and chimps, and perhaps some of the other equally intelligent animals out there. It’s what helps us care for and about those in need around us and rejoice in their success.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">It’s generally considered to be a female trait, but I think it helps to define us as human beings. An uncaring perspective, relegated to simply reacting to the emotions of others without understanding them, can lead to a worldview unable to take that dimension of the human condition into consideration.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">It’s easy to see how empathy could have helped our distant ancestors. With the ability to care about the suffering of others they were able to see a need for compassion. This mutual support would have allowed for closer knit communities and more caring for those most in need.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Some studies have found that people with conservative viewpoints are less likely to have fully developed senses of empathy. It can generally be seen in calls to war, the subjugation of others and attempts to force personal worldviews onto the lives of others. Rejection of the importance of the emotional component of human life can make for an inhumane person that fails to sway any but the most angry and bigoted of people.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">On the opposite side of empathy is schadenfreude, or taking pleasure in the suffering of others. It’s often associated with a desire to see someone punished for perceived crimes. For instance: a working class man chuckling when his boss gets taken to jail for tax evasion. Studies have revealed that this feeling is much more prevalent in men than women. Whether that’s a cultural phenomenon or endemic to the human condition is hard to determine.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Possible evolutionary explanations for schadenfreude are that it helped encourage the punishment of those who acted against the interests of the community. A troublemaker would have been a big problem in early human groups, as survival was a main concern.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Do schadenfreude and a lack of empathy make for a lack of humanity? Perhaps not schadenfreude, since in a sense it holds us together in the desire to punish those who make life harder for all of us. A lack of empathy, however, seems to certainly make a person less humane, but less human? Perhaps denying a person’s humanity is a stance that in itself removes our own humanity. But that could just be my empathy talking.</p>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com2tag:blogger.com,1999:blog-559607698251593540.post-74084474549741901062009-12-08T10:41:00.000-04:002009-12-08T10:42:03.423-04:00A Trip to the United Kingdom<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">I have never had the pleasure of traveling to Europe before. In fact, I’ve never left the borders of North America, having only visited parts of Canada and the US. In June 2010, it seems that this is going to change; my father will be taking me to Belgium both to visit relatives and see the sights. Realizing how easy it would be to simply take some of that time to visit the United Kingdom gave me the idea to have a few tweetups with my UK tweeples, and of course, see the sights.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">My basic idea is to take a week of my European trip to travel through the UK. I’m planning to have stays in London, Liverpool and Edinburgh. There’ll be a plane trip from Halifax to London, then a train trip to Liverpool, followed by another train trip to Edinburgh, and finally a plane to Brussels to join my father in Belgium.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">I’m planning to get to London between the 10th and 12th of June, with a departure from Edinburgh between the 18th and 20th of the same month. How much time I spend in each city will depend on what I end up planning for them.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Should I put Canadian flags on my luggage and backpacks? Is that still a good idea, or has our current government soured the world to Canada? Stephen Harper is an ass, and I’m terribly embarrassed that my fellow Canadians elected his party of knuckle-dragging, petroleum-guzzling, bigoted troglodytes. I also apologize for Céline Dion. I should have nipped that in the bud at the beginning.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">There are some things I’d definitely like to do, but as for the rest of my time I’d like some input from people living in the areas as to what’s worth doing. Tweetups are a must! I have no objection to multiple tweetups in each city, and I’d encourage such behaviour. Hehehe…</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Meeting famous UK tweeters would be cool. I have no expectations to meet Graham Linehan, Stephen Fry, James Moran, Edgar Wright, Simon Pegg, Nick Frost or Robert Llewelyn, but I certainly wouldn’t object to it. Hehehe… I don’t know if that’s the full list of the UK twitter celebs I follow, since I’m without Internet access as I write this. Not sure where Neil Gaiman will be then, since I believe he lives most of the time at his home in the US.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">If I could apologize to Douglas Adams’ widow in person for being an ass to him through email in the ‘90s, that’d be great. I pissed him off royally and have always felt bad about it. I’d think that he shared his frustration and anger with her, so I hope she wouldn’t try to kick me in the groin. Slap in the face would be acceptable, however, since I was an enormous asshole to him.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">My general goals for the UK leg of the trip are as follows:</p> <ul style="list-style-type: disc"> <li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Meet my tweeples</li> <li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Visit various structures, both historic and pre-historic</li> <li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Enjoy the culinary delights of England and Scotland</li> <li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">See the countryside</li> <li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">See Hadrian’s wall</li> <li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Experience English weather</li> </ul> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">My specific goals for London:</p> <ul style="list-style-type: disc"> <li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Visit the Tower of London</li> <li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Visit the Speaker’s Corner in Hyde Park</li> <li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Get in a good bit of fish & chips</li> <li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Take him out to visit the Queen, always shouts out something obscene</li> <li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Maybe see Buckingham Palace</li> </ul> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">My specific goals for Liverpool:</p> <ul style="list-style-type: disc"> <li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Visit Beatles related locales (yes, I’m a Beatles fan)</li> <li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Visit the port</li> <li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Do something typically Liverpool (I’ll need suggestions)</li> <li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Check out Manchester, see if I can find Claude</li> </ul> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">My specific goals for Edinburgh:</p> <ul style="list-style-type: disc"> <li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Visit Elliott clan related locations (I’m an Elliott)</li> <li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Try some authentic haggis (Hehehe…)</li> <li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Take in some traditional Scottish music</li> <li style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">See the Scottish moors in moonlight and daylight</li> </ul> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">I’ll be staying in hostels while I’m there. If you know of any specific ones that have better reputations or have a good cost to benefit ratio, that’d be great. If you feel so inclined, I’ll also accept a camping mattress and sleeping bag in your broom closet.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">There are a couple of issues I’ll have to deal with. First and foremost is that I’m not much of a driver. I may have my complete license by then, but I wouldn’t be comfortable driving on the other side of the road when I’m so inexperienced. Might try it out just for fun.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Trains and buses will be my main modes of transit, unless I can get into better shape and bike a bit. I don’t know the price of bicycle rental, but it may be cheaper than buses. I’ll need some input on that.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">I can’t drink, so anything that requires drinking is out of the question. I wouldn’t mind visiting pubs, as long as I’m assured of non-alcoholic beverages. Anyone with me should feel free to imbibe to their desired level of inebriety. I may be happy to be a designated driver in that case. Me sober is definitely likely to be safer than someone drunk off their ass.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">If I get into better shape, I should be fine. However, at the moment I tire relatively easily. That’s why I’d like a week; I can take things in slowly. However, if I do manage to be healthier it’d be great to see more rather than less.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Some sort of help from my local tweeples would be handy. Maybe someone available during the week days to help guide me to where it is I’m going, or someone to help plan outings the day before. I’ll try to look up as much as possible ahead of time online, but someone local usually knows the “hidden” spots as well, and company is always welcome. I’ll pay in kebabs and chips if desired. Hehehe…</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Places that have free WiFi are very welcome. I’ll bring along my iPod Touch to tweet and blog. Probably cheaper and easier to find a UK USB charger over there when I arrive rather than look for one here. If I could find a way to upload pictures from my camera that’d be great. Not sure if my iPod could do it.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Now that this is in the works, I’m looking forward to it quite a lot. My mother’s side is all descended from Scotch and Anglo-Saxon lines. It’ll be interesting to see the Motherland. Hehehe… It’ll be a big bonus to meet my UK tweeples, since some of you have become really good friends. Hopefully everything will work out nicely and I’ll have a fantastic time!</p>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com2tag:blogger.com,1999:blog-559607698251593540.post-40665754861728145472009-10-02T10:06:00.003-03:002009-10-23T09:29:21.085-03:00Why I Follow the Tweeps I Do<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">140 characters is just not enough to do justice to the people I follow that make my Twitter experience so great. Either that, or I’d have to flood people’s timelines with many, many tweets. That’s just wrong... But if I forgot you, and you feel wronged by it, feel free to chew me out publicly in tweets. If I mess up the links to your twitter pages, I'm sorry. Beatings are encouraged.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">First and foremost: @<a href="http://twitter.com/JardinDeSophie">JardinDeSophie</a> because she is my wife and the bestest. I don’t know where I’d be without her.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">@betagoddess One very special tweep who will be silent forever. I miss my mother.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Good people: People who have engaged me in conversation, some of them have helped me through the hardest time of my life. @<a href="http://twitter.com/ladyloki">ladyloki</a> @<a href="http://twitter.com/botticellirejct">botticellirejct</a> @<a href="http://twitter.com/mergyeugnau">mergyeugnau</a> @<a href="http://twitter.com/bird42">bird42</a> @<a href="http://twitter.com/ram327">ram327</a> @<a href="http://twitter.com/WongoWoman">WongoWoman</a> @<a href="http://twitter.com/CS999">CS999</a> @<a href="http://twitter.com/doodledawne">doodledawne</a> @<a href="http://twitter.com/KingBobulousIII">KingBobulousIII</a> @<a href="http://twitter.com/sundaeg1rl">sundaeg1rl</a> @<a href="http://twitter.com/M20Mermaid">M20Mermaid</a> @<a href="http://twitter.com/damarisens">damarisens</a> @<a href="http://twitter.com/mr_craig">mr_craig</a> @<a href="http://twitter.com/JulesHardy">JulesHardy</a> @<a href="http://twitter.com/Noadi">Noadi</a> @<a href="http://twitter.com/Angry_Atheist">Angry_Atheist</a> @<a href="http://twitter.com/happy_atheist">happy_atheist</a> @<a href="http://twitter.com/TheMadderHat">TheMadderHat</a> @<a href="http://twitter.com/kpibca">kpibca</a> @<a href="http://twitter.com/Smithengarde">Smithengarde</a> @<a href="http://twitter.com/Scriblit">Scriblit</a></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Atheists: These tweeps I follow because they don’t believe in silly things like sky cake. @<a href="http://twitter.com/theadividual">theadividual</a> @<a href="http://twitter.com/theonides">theonides</a> @<a href="http://twitter.com/achura">achura</a> @<a href="http://twitter.com/AtheistDoug">AtheistDoug</a> @<a href="http://twitter.com/almightygod">almightygod</a> @<a href="http://twitter.com/_SATAN_">_SATAN_</a> @<a href="http://twitter.com/pzmyers">pzmyers</a> @<a href="http://twitter.com/AthOnTwi">AthOnTwi</a> @<a href="http://twitter.com/jref">jref</a> @<a href="http://twitter.com/AtheistInWA">AtheistInWA</a> @<a href="http://twitter.com/ainajaharah">ainajaharah</a></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">Facts and Figures: One reason I follow certain accounts is for the information they convey. These accounts always have great tidbits. @<a href="http://twitter.com/factlets">factlets</a> @<a href="http://twitter.com/mindhackz">mindhackz</a> @<a href="http://twitter.com/make">make</a> @<a href="http://twitter.com/BioscienceNews">BioscienceNews</a> @<a href="http://twitter.com/SpaceAstro">SpaceAstro</a> @<a href="http://twitter.com/HowStuffWorks">HowStuffWorks</a><a href="http://www.cbc.ca/news/blogwatch/2009/01/cbcnewsca_on_twitter.html"> CBC Twitter Feeds</a> @<a href="http://twitter.com/mashable">mashable</a> @<a href="http://twitter.com/archaeology">archaeology</a> @<a href="http://twitter.com/NASA">NASA</a> @<a href="http://twitter.com/whycenter">whycenter</a> @<a href="http://twitter.com/BadAstronomer">BadAstronomer</a> @<a href="http://twitter.com/DiscoverMag">DiscoverMag</a> @<a href="http://twitter.com/Discovery">Discovery</a> @<a href="http://twitter.com/qikipedia">qikipedia</a> @<a href="http://twitter.com/sciam">sciam</a> @<a href="http://twitter.com/Lifehacker">Lifehacker</a></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">I’m not including celebrities, simply because I’m sure if you’re interested in them you’ve either found them already or will soon enough.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS; min-height: 16.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Trebuchet MS">That’s it for this week. I might just use this every week, until I find other interesting tweeps, which I’ll probably just add here. I may add other categories for those that I don’t have up here yet.</p>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com0tag:blogger.com,1999:blog-559607698251593540.post-29524607560659452132009-09-29T13:00:00.004-03:002009-10-02T10:28:27.412-03:00If I Grow Up<span class="Apple-style-span" style=" ;font-family:Times;font-size:medium;"><div style="margin-top: 6px; margin-right: 6px; margin-bottom: 6px; margin-left: 6px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; min-height: 1100px; counter-reset: __goog_page__ 0; line-height: normal; font-family:'Times New Roman';font-size:12pt;"><div class="Section1" style="margin-top: 0px; margin-bottom: 0px; "><p style="margin-top: 0px; margin-right: 0pt; margin-bottom: 0px; margin-left: 0pt; "><span class="Apple-style-span" style=" ;font-family:TrebuchetMS, serif;font-size:medium;">I’ve figured out what I want to be if I grow up: a writer. In fact, by writing this I’m living the dream, aren’t I? I guess things have been building up to this my whole life; I’ve been reading since I could, and writing even when I didn’t have to.</span></p><p style="margin-top: 0px; margin-right: 0pt; margin-bottom: 0px; margin-left: 0pt; "><span class="Apple-style-span" style="font-family:TrebuchetMS, serif;"><br /></span></p><p style="margin-top: 0px; margin-right: 0pt; margin-bottom: 0px; margin-left: 0pt; "><span style=" ;font-family:TrebuchetMS;"><span><span class="Apple-style-span" style="font-size:medium;"> </span></span></span></p><p style="margin-top: 0px; margin-right: 0pt; margin-bottom: 0px; margin-left: 0pt; "><span style=" ;font-family:TrebuchetMS;"><span><span class="Apple-style-span" style="font-size:medium;">Whatever my <a href="http://ideaoubliette.blogspot.com/2009/09/living-with-bipolar-disorder.html">mood</a> has been, as long as it wasn’t too severe, I’ve always written. When I was down, I wrote depressing poetry or prose. When I was up, I wrote whatever popped into my head. Now that I’m stable, I can take the time to write coherent, sensible articles.</span></span></span></p><p style="margin-top: 0px; margin-right: 0pt; margin-bottom: 0px; margin-left: 0pt; "><span style=" ;font-family:TrebuchetMS;"><span><span class="Apple-style-span" style="font-size:medium;"> </span></span></span></p><p style="margin-top: 0px; margin-right: 0pt; margin-bottom: 0px; margin-left: 0pt; "><span class="Apple-style-span" style="font-family:TrebuchetMS, serif;"><b><br /></b></span></p><p style="margin-top: 0px; margin-right: 0pt; margin-bottom: 0px; margin-left: 0pt; "><span style=" ;font-family:TrebuchetMS;"><b><span><span class="Apple-style-span" style="font-size:medium;">What are you going to write?</span></span></b></span><span style=" ;font-family:TrebuchetMS;"><span><span class="Apple-style-span" style="font-size:medium;"> It’s a good question, and I like it quite a bit. I’m going to write articles here, like the ones I’ve written so far. I’m going to write for <a href="http://www.handmadenews.org/columnist/index.php?aid=1883">HandmadeNews.org</a>, with my <a href="http://www.handmadenews.org/article/index.php?id=3686">first article</a> there out just recently. I’ll always be writing emails. Sometimes I’ll write things down in my notebooks. If I feel like my writing is worthy of it, I might write a screenplay <a href="http://blogs.villagevoice.com/runninscared/archives/2009/09/i_will_not_read.php?page=1">Josh Olson</a> would enjoy reading. I wont bring it to him to read, though. If it’s good enough it might make its way to him.</span></span></span></p><p style="margin-top: 0px; margin-right: 0pt; margin-bottom: 0px; margin-left: 0pt; "><span style=" ;font-family:TrebuchetMS;"><span><span class="Apple-style-span" style="font-size:medium;"> </span></span></span></p><p style="margin-top: 0px; margin-right: 0pt; margin-bottom: 0px; margin-left: 0pt; "><span class="Apple-style-span" style="font-family:TrebuchetMS, serif;"><b><br /></b></span></p><p style="margin-top: 0px; margin-right: 0pt; margin-bottom: 0px; margin-left: 0pt; "><span style=" ;font-family:TrebuchetMS;"><b><span><span class="Apple-style-span" style="font-size:medium;">What about your degree?</span></span></b></span><span style=" ;font-family:TrebuchetMS;"><span><span class="Apple-style-span" style="font-size:medium;"> It took me a bit longer to finish my computer science degree than most, partly because of my involvement with the co-operative education program I was in. I like writing software, and I like thinking and reading about it. The time I spent there I consider formative, and it will certainly help me out in my current endeavour.</span></span></span></p><p style="margin-top: 0px; margin-right: 0pt; margin-bottom: 0px; margin-left: 0pt; "><span style=" ;font-family:TrebuchetMS;"><span><span class="Apple-style-span" style="font-size:medium;"> </span></span></span></p><p style="margin-top: 0px; margin-right: 0pt; margin-bottom: 0px; margin-left: 0pt; "><span class="Apple-style-span" style="font-family:TrebuchetMS, serif;"><b><br /></b></span></p><p style="margin-top: 0px; margin-right: 0pt; margin-bottom: 0px; margin-left: 0pt; "><span style=" ;font-family:TrebuchetMS;"><b><span><span class="Apple-style-span" style="font-size:medium;">What about the other things you enjoy doing?</span></span></b></span><span style=" ;font-family:TrebuchetMS;"><span><span class="Apple-style-span" style="font-size:medium;"> I’ll keep doing them, but with renewed purpose. The electronics projects I work on, my small programming projects and bits of art I produce will all be used to service my writing. When I make something, I’ll write about it. I’ll let the people who want to know hear about it. Anyone else can choose not to read it.</span></span></span></p><p style="margin-top: 0px; margin-right: 0pt; margin-bottom: 0px; margin-left: 0pt; "><span style=" ;font-family:TrebuchetMS;"><span><span class="Apple-style-span" style="font-size:medium;"> </span></span></span></p><p style="margin-top: 0px; margin-right: 0pt; margin-bottom: 0px; margin-left: 0pt; "><span class="Apple-style-span" style="font-family:TrebuchetMS, serif;"><b><br /></b></span></p><p style="margin-top: 0px; margin-right: 0pt; margin-bottom: 0px; margin-left: 0pt; "><span style=" ;font-family:TrebuchetMS;"><b><span><span class="Apple-style-span" style="font-size:medium;">How are you going to make money?</span></span></b></span><span style=" ;font-family:TrebuchetMS;"><span><span class="Apple-style-span" style="font-size:medium;"> A good question, everyone needs money these days. I don’t need much, though. Apart from my love of gadgets, I have simple needs. Food, clothing, shelter. I have the <a href="http://jardindesophie.blogspot.com/">love of my life</a> to keep me well loved, I have my family, and more of that simply couldn’t be bought. I’d really rather be famous for my love of the craft than rich because my work sells well. I wouldn’t mind both, but we’ll see how it all turns out.</span></span></span></p><p style="margin-top: 0px; margin-right: 0pt; margin-bottom: 0px; margin-left: 0pt; "><span style=" ;font-family:TrebuchetMS;"><span><span class="Apple-style-span" style="font-size:medium;"> </span></span></span></p><p style="margin-top: 0px; margin-right: 0pt; margin-bottom: 0px; margin-left: 0pt; "><span class="Apple-style-span" style="font-family:TrebuchetMS, serif;"><b><br /></b></span></p><p style="margin-top: 0px; margin-right: 0pt; margin-bottom: 0px; margin-left: 0pt; "><span style=" ;font-family:TrebuchetMS;"><b><span><span class="Apple-style-span" style="font-size:medium;">“If” you grow up?</span></span></b></span><span style=" ;font-family:TrebuchetMS;"><span><span class="Apple-style-span" style="font-size:medium;"> Never assume you are mature; it’s a very immature viewpoint. And to quote the Peter Pan musical, “If growing up means it would be, beneath my dignity to climb a tree, then I wont grow up, never grow up, not me!” Besides, if you stop taking joy in simple things, then what reason do you have to write?<br /></span></span></span></p><div><span class="Apple-style-span" style="font-family:TrebuchetMS, serif;"><span class="Apple-style-span" style="font-size:large;"><br /></span></span></div></div></div></span>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com2tag:blogger.com,1999:blog-559607698251593540.post-53528131234725505822009-09-26T10:36:00.001-03:002009-09-26T10:37:33.165-03:00What Kind of Games?<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">I started programming when I was young, with the hopes of writing video games. I think a lot of kids start that way. When you like something, or someone, you try to emulate what you’re seeing. But how has that early dream turned out?</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">They tell writers to write what they know. It’s good advice. How can you write about life in the Serengeti without have someone to give you a first hand account or having been there yourself? You can always use your imagination, and that’s all you can really do when writing fantasy or science fiction. It works for writing video games. How can you expect to write a genre you don’t immerse yourself in?</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">These days I spend most of my gaming time playing casual games. I’m busy doing other things, and don’t want to spend long stretches just sitting at the console or computer. Recently I read an article about the kind of video games the most people tend to flock to. Typically they’re games that are relatively simple and involve sorting things in some way. It bears out in my own tastes.</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">In late 2008, I entered the uDevGames contest, and </span></span><a href="http://www.udevgames.com/games/entry/gnomespy/"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">submitted a casual game</span></span></a><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"> for consideration. It didn’t do too well, but I hadn’t spent enough time on it. The graphics are primitive and my soundtrack stinks. However, I think I’m going to revamp it for an iPhone/iPod touch release. I’ve been working on better graphics, for one. The basic game play appealed to the people who played it, so that wont be changing. I’ll add a few more game elements, and a high score list, of course.</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">Another favourite genre of mine is the story-driven RPG or adventure game. This is by far one of the most involved type of game you can develop. I’ve started innumerable aborted attempts at designs, filling notebooks with my ideas.</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">As long as everything works out as I’d like, a new version of GnomeSpy will be in the works. It’ll satisfy my desire to write video games, while giving me a base to improve on. Maybe I’ll put in a bit more story, for a little extra flavour. Who knows, it might become popular.</span></span></p>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com0tag:blogger.com,1999:blog-559607698251593540.post-57855897765061387032009-09-13T02:00:00.000-03:002009-09-13T02:00:00.108-03:00Terry the Space Bum<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size:medium;">Here's a quicky I wrote trying to mix science fiction and horror a little.</span></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman', fantasy;"><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman', fantasy;"><span class="Apple-style-span" style="font-size:medium;">It was always a bit cold in space stations, Terry thought. Sometimes it made it hard to sleep on the metal deck plating, but then again, beggars can't be choosers. He'd been waiting for a transport for weeks, so he could hitch a ride out of Titan Station, but strangely, none had come. In his experience, even remote research stations like this one tended to get weekly supply shipments.</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman', fantasy;"><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman';"><span class="Apple-style-span" style="font-size:medium;">There was no trouble keeping out of sight from the scientists on board, they were too consumed with whatever research they were conducting. Just as well, he thought, it gave him an easier time when dipping into the food stores. Not fantastic fare, certainly not 'an epicure's delight,' as the last transport's in-flight magazine had described his previous home's cooking.</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman', fantasy;"><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman';"><span class="Apple-style-span" style="font-size:medium;">But then again, there was no beating Mars colony's Advanced Flavour Enhancer 3000; it made even stale bread taste delicious. He had tried to sneak some out with him, but there must have been some kind of theft-prevention device that evaporated the stuff when he left orbit. It was a finicky substance even on Mars' surface, but they produced enough that even a space bum like Terry could snatch a bit here and there.</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman', fantasy;"><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman';"><span class="Apple-style-span" style="font-size:medium;">Thinking of the time since the last transport dropped him off here, he realized that this station didn't have forced day and night. He had been relying on the chronometers in the station to keep track of time, and they could be running on some standard the scientists had picked. The last few research posts and stations he'd visited seemed to keep different time standards, probably picked by the scientists there for some reason known only to themselves. But Terry still had his watch on those visits, and it was set to Earth standard. He had been able to tell how fast or slow the local time ran.</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman', fantasy;"><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman';"><span class="Apple-style-span" style="font-size:medium;">But it didn't much matter, the station was well stocked, enough for a year, given the number of scientists manning the station, and himself. He hoped that wasn't a sign that he'd be there quite that long, but the more remote stations kept larger stocks, 'just in case.'</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman', fantasy;"><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman';"><span class="Apple-style-span" style="font-size:medium;">It was into the second month that he started hearing the noises. Every station had its own set of creaks and groans, but these were different. Whispers around the corner in a corridor, rustling in drawers, the scrape of nails on metal, just out of sight. At first he thought it was the scientists, but the station computer kept track of them, and none of them were anywhere near his location. He had welcomed this feature when he first arrived, it allowed him to keep out of their way. But now, with these sounds, it was becoming a recrimination, as if saying 'you have to be crazy if you think you're going to survive here.'</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman', fantasy;"><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman';"><span class="Apple-style-span" style="font-size:medium;">The sounds continued into the next month, and he was becoming progressively more and more on edge. When he started seeing things, shadows flickering near the sounds, he started to question whether or not all those old science fiction stories dealing with space insanity had some kind of prophetic quality. Sure, the Sol Health Organization said there was no evidence that any could actually go space-crazy, but he had always wondered about that.</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman', fantasy;"><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman';"><span class="Apple-style-span" style="font-size:medium;">The shadows were mostly formless, but occasionally he'd catch a shadow of something pointed, like a knife. With all the new ways of killing people that had been invented recently, the knife was still a good old stand-by. Never runs out of power, doesn't get jammed, can be concealed just about anywhere. He was beginning to wonder why he didn't carry one.</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman', fantasy;"><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman';"><span class="Apple-style-span" style="font-size:medium;">By the fourth month, the sounds started getting more and more menacing. The whispers took on an angry tone, the scraping sounds became a little more violent. He couldn't reveal his presence to the station's crew, but at the same time he was getting very scared, and thought that perhaps the crew would be able to protect him.</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman', fantasy;"><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman';"><span class="Apple-style-span" style="font-size:medium;">In the fifth month, when he started catching glimpses of something making the shadows, he was almost about to pop into the main science lab and for protection. He was drawing near, keeping an eye on the computer monitor throughout to see where everyone was. Then the screaming started, horrible, pained screams, little splashes against the walls and dull thuds afterwards. The monitors showed the dots representing the scientists slowly fade, one by one, as they were apparently being slaughtered. One dot remained, and he heard pleading screams, "No, no, please god, no!" When he heard the scraping noise start again, and head towards him, out of the lab, he ran.</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman', fantasy;"><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman';"><span class="Apple-style-span" style="font-size:medium;">In his excited state, it took him a while to figure out what to do. There was, in case of emergency, a special craft designed specifically for returning the crew to Earth. He had to get to it and get back, so he could tell someone what had happened. Luckily it was attached to the station near the docking bay, where he had first arrived. It was in the opposite direction from the lab, and so that's where he went.</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman', fantasy;"><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman';"><span class="Apple-style-span" style="font-size:medium;">It took him a little longer to get everything set up, being this excited, but he did finally disengage the holding clamps and get the launch thrusters going. It wasn't until the station appeared as a distance dot in his rear viewport that he let himself start breathing normally again.</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman', fantasy;"><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman';"><span class="Apple-style-span" style="font-size:medium;">"Did you see his face?" one of the scientists laughed to the others, back, safe, and in the lab.</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman', fantasy;"><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman';"><span class="Apple-style-span" style="font-size:medium;">"Man, that was the most fun I've had all year!" another replied.</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman', fantasy;"><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman';"><span class="Apple-style-span" style="font-size:medium;">"But he just took our escape pod," said a third.</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman', fantasy;"><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman';"><span class="Apple-style-span" style="font-size:medium;">"And the resupply ship's already left Earth," added the fourth, "so we can't get it to pick a replacement up for us."</span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman', fantasy;"><span class="Apple-style-span" style="white-space: pre; "><span class="Apple-style-span" style="font-size:medium;"><br /></span></span></span></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; "><span class="Apple-style-span" style="font-family:'times new roman';"><span class="Apple-style-span" style="font-size:medium;">"Oh crap," said the first, "it looks like when the pod took off, it tore a crack in the station's hull. We're leaking atmosphere."</span></span></p>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com0tag:blogger.com,1999:blog-559607698251593540.post-7335126318669850262009-09-12T18:51:00.002-03:002009-09-12T18:53:20.057-03:00Losing a loved one, as an atheist<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-size:medium;">When I was around 11 or 12, I started to question the received wisdom that there was a deity. I came to the conclusion that all signs pointed to no. Do I outright, unequivocally and without reservation deny the existence of such an entity? No. However, I don’t see it as a likely scenario, and until I’m presented with hard evidence, I have enough reason to say that there isn’t.</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-size:medium;"><br /></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-size:medium;">Some people take comfort in their religious beliefs, especially their belief in an afterlife. I have no interest in an afterlife, either for myself of my loved ones. In the past five years I’ve lost both my grandmother and mother, both of whom I loved dearly.</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-size:medium;"><br /></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-size:medium;">No amount of belief in an afterlife would soothe my pain. I mourn at the fact that they are lost from my life, right here, right now. I imagine it’s the same even for those who believe that the dead pass on to somewhere else. You can’t escape the fact that their tangible presence is forever gone from your life. Unless you believe in ghosts, but that’s a whole other can of worms.</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-size:medium;"><br /></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-size:medium;">I have my memories of them, and if I filter those memories, I can choose to only remember the good things. I can remember my mother’s kind words, my grandmother’s stolid support, and their love for each other. Aside from senility, nothing can take those memories from me, and I wont ever let anything try to. They’re mine to keep, and I’ll treasure them until I die.</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-size:medium;"><br /></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-size:medium;">I loved them both, and it’s hit me hard, especially my mother’s recent death. As a non-believer, I don’t have to question why a god would choose to take my mother away at 59. I don’t have to ask why they would let such a thing happen, if they hadn’t directed it specifically. Even if there is a god, I don’t care why. Our universe operates under certain natural laws, and I’m okay with that. Those natural laws brought me to life, and gave me a happy life with my mother’s constant support. Would I trade that in for false hope of an afterlife? Never. I wouldn’t dream of it.</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-size:medium;"><br /></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-size:medium;">To me the beauty of the natural world is that it is there in its own right. It doesn’t require any omnipotent fiat, it operates within a consistent set of rules, and it has brought itself to this complex state from incredibly simple components. Belief in some sort of deity would actually take away from the universe’s beauty; it would steal from it its grandeur and splendor. To stand on its own legs it demonstrates a quality of greatness.</span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-size:medium;"><br /></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-size:medium;">Would my grief be at all assuaged by thoughts of an afterlife? No, I am certain it would not. I loved them, and they’re gone from my life forever. I’m not angry at anything for their loss. I’m left with memories to cherish, love in my heart for them still, and the knowledge that what they left behind came from themselves.</span></p>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com5tag:blogger.com,1999:blog-559607698251593540.post-53138870846533332482009-09-04T13:02:00.001-03:002009-09-04T13:02:57.681-03:00Living with Bipolar Disorder<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS">Feeling down when something bad happens is normal. Feeling elated when something good happens is great. Bipolar disorder is neither. Previously referred to as manic depressive disorder, bipolar disorder consists of mood episodes ranging from deep, dark depression to the sense of invincibility and superiority that is characteristic of a manic phase. It disrupts the lives of those who suffer from it and all those around them. Luckily, however, with the right course of treatment it can be kept under control.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS">Bipolar disorder has been found to be linked genetically and physiologically to schizophrenia. A person suffering from bipolar disorder can experience the same sort of hallucinations and delusions as someone with schizophrenia. Both have a genetic component, with a number of genes interacting to create a pre-disposition to these disorders. The families of those afflicted often include others with one of these disorders, mood disorders or alcoholism.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS">Depression is a common symptom of many health problems. It can stem from difficult situations or simply an inability to cope with the stresses of everyday life. In the case of bipolar disorder, depression is a component of a mood cycle that can send the individual on a roller coaster of trouble. My own experiences with depression have affected me greatly. For 6 months in 2004, I had to leave work in order to recover from a severe episode. There were days I never left bed, others where I couldn’t even face leaving home to walk my dogs. It’s debilitating, but only one aspect of bipolar disorder.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS">The phase most associated with bipolar disorder, by the public, is mania. Mania can consist of impulsive behaviour, a sense of elation without reason, inappropriate behaviour, delusions and hallucinations. This phase is incredibly disruptive to the social community around the individual. It can lead to lost jobs, lost friendships, massive debt from impulsive spending or gifting, serious jail time and the contraction of STDs from high-risk sex. Luckily, in my case mania has not been a big component. It has surfaced, however, and has ruined at least one of my most treasured friendships. I wouldn’t wish it on anyone.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS">Hypomania, as its name implies, is a milder form of mania. It is often characterized by increased creativity, increased self-confidence and an increase in productivity. Persons in this state are often more social, displaying an unusual amount of charm. This phase is one of the reasons some people with bipolar disorder stop taking their medication. When the effects of hypomania are dampened by medication, many individuals stop their treatment in an effort to regain some of the benefits of this mood. It is, however, a symptom of the disorder, and should be regarded as such and treated accordingly.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS">An individual suffering from the disorder can also find themselves in a mixed state, where depressive and manic symptoms mingle to create a special kind of hell. Irritability, delusions, lack of energy and a short temper are a few of the traits that can be found in a person in this state.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS">There are a number of diagnoses within bipolar disorder that are characterized by the individual’s specific history of these different phases. However, I am not a psychiatrist, and if you think you are experiencing these symptoms see a qualified psychiatrist as soon as possible.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS">Treatment requires a number of approaches. From the pharmacological end, sometimes anti-psychotics are required. Mood stabilizers are a common prescription, since in most cases the extreme peaks and valleys need to be brought in check. Some individuals also require an anti-depressant to lift them up out of recurring depressive episodes. Medication is usually the front line of the battle, as it can be impossible to work with an individual who is hallucinating, delusional or otherwise unable to fully cooperate.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS">Cognitive behavioural therapy can help the person suffering learn how to rein in their mood. It’s been shown to be one of the few talk therapies that can actually help in the treatment of depression. There have been clinical trials demonstrating its effectiveness, and I can attest that it worked for me.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS">Symptoms can manifest themselves at a relatively young age. Occasionally children who later turn out to have bipolar disorder are diagnosed with attention deficit hyperactivity disorder. The stimulants used to treat ADHD can often aggravate the child’s condition and make treatment down the road more difficult. It is always important to make sure you tell your child’s doctor, as well as your own, of any and all family history of psychiatric illness or symptoms similar to those of bipolar disorder.</p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><br /></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS">My own history of bipolar disorder has sensitized me to the issues facing individuals with psychiatric disorders. Unfortunately, much of the population is unaware of the nature of these illnesses, and often attribute the symptoms to personal failings on the part of those suffering. A terrible stigma is attached to bipolar disorder and it can be difficult to shake.</p>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com4tag:blogger.com,1999:blog-559607698251593540.post-69944510432053675362009-09-02T12:56:00.000-03:002009-09-02T12:57:22.094-03:00An Open Letter to David Hewlett<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">Dear Mr. Hewlett,</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">I’m writing to you in the hopes that you’ll read this and learn a bit about the great woman who was my mother and a big fan of yours. Helen died recently at the much-too-young age of 59. In April she found out she had pancreatic cancer; less than 5 months later, she passed away.</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">If you don’t read this, that’s okay, I guess, because it’s also a part of my grieving process. I think you’ll be touched by it, but at the same time, it’s helping me deal with the loss.</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><b><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">My mother as your fan</span></span></b></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">Every movie you were in, she wanted to see. She didn’t get a chance to before she went. I had wanted to buy her A Dog’s Breakfast for Christmas; I think she would have really liked it. I think Cube would have given her a bit of claustrophobia, but didn’t it do that for everyone?</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">She loved Atlantis. I think your performance was a big part of that. Joe Flanigan and Paul McGillion may also have had something to do with that. The episodes she watched of SG-1 were mostly the ones with McKay in them, because of you. Maybe she saw a bit of me in McKay, as I’m definitely a geek, and I’ve been known to have arrogant moments.</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">She was so excited to get the season 5 DVDs recently, but she never got to watch any of it. I think my dad is the one most saddened by that fact. They watched all of Atlantis together, sharing in the joy of watching an entertaining show. There were lots of shows they enjoyed together, and wont have the chance to anymore.</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">McKay, I felt, made Atlantis. I’m a big fan too, and have probably seen many more of the movies you’ve been in than she did. I’m sad she didn’t get to see more, since I’ve always enjoyed your performances.</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">There are other aspects of her involvement with fandom, and if you’re interested I can tell you about them directly. This letter is mostly about the other parts of her life.</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><b><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">My mother as a great woman</span></span></b></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">There are no monuments erected in her honour. There never are for the everyday heroes. But I think she would have felt a little uncomfortable if there had been. Her biggest failing was that she often under-sold herself. She was a great woman, and with more self-esteem she would have seen it, I think.</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">From a young age she instilled in me a love of reading. She’d read to me every night from any number of books. The Hobbit, the Chronicles of Narnia, E. B. White’s books, anything she thought I would enjoy. I started going through her collection of sci-fi and fantasy books before I left elementary school; big, thick volumes of Anne McCaffrey and Stephen King. While I liked watching shows like Reading Rainbow, I didn’t need them to boost my love of reading.</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">Literacy was an important skill to her. She volunteered at local schools, helping kids who had trouble reading. I’m sure her love of reading helped those kids along more than anything else. Her patience no doubt also played a role, but I think if an educator shows great enthusiasm for the subject, the student will pick it up at least a bit.</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">She was part of a women’s group in her area. I believe she was the youngest there, and many of the women didn’t drive because of their age. Along with another woman, she would drive those who couldn’t to and from their meetings or outings.</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">Her support kept me going through some of the hardest times of my life. If it weren’t for her, I wouldn’t be here writing this. It might be that others wouldn’t have managed to pull through if she hadn’t been here either.</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">She was generous and caring, and helped those she could. She always looked out for the underdog, knowing that it was a hard place to be. The popular and successful deserve support as well, but it’s always the downtrodden who are elevated more by a helping hand.</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">I owe my creativity, intelligence and curiosity to her. She bought our first computer when I was quite young, and without it and her support, I never would have taken a degree in computer science. Without her I would have never had a minor in linguistics to go with it. I wouldn’t have the breadth of knowledge I do, or the desire to expand it. I know she was proud of me, and I hope that she knew how big a role she had in helping me to where I am now.</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">She’s had one funeral service already, shortly after she passed. There are another two scheduled in the next two months. Three services might be unusual, but I think she deserved the extra recognition and the opportunity for as many as possible to celebrate her life. She was a wonderful woman, full of life and compassion. I’ll never forget her, and while there’s no monument out there in her honour, there’ll always be the one in my heart.</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">Thanks for taking the time to read this, I appreciate it.</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS; min-height: 15.0px"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;"><br /></span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">Sincerely,</span></span></p> <p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Trebuchet MS"><span class="Apple-style-span" style="font-family:'trebuchet ms';"><span class="Apple-style-span" style="font-size: medium;">James Dessart</span></span></p><div><span class="Apple-style-span" style="font-family:'Trebuchet MS', serif;font-size:100%;"><span class="Apple-style-span" style="font-size: 13px;"><br /></span></span></div>skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com0tag:blogger.com,1999:blog-559607698251593540.post-22662395911147344382009-09-02T12:04:00.002-03:002009-09-02T12:06:04.739-03:00Change in toneMy next few posts will be very personal. My mother passed away last week, and I need to write in order to properly grieve. I want to share my thoughts, and I hope they might inspire or touch some of you.skwirl42http://www.blogger.com/profile/10000234497679954212noreply@blogger.com0