Skip to content

Instantly share code, notes, and snippets.

View avidrucker's full-sized avatar

Avi Drucker avidrucker

  • SUNY Orange and SUNY WCC
  • New York
View GitHub Profile

LCC+ Instruction Set Addendum

This document summarizes the additions and differences between the original LCC instruction set and the LCC+ extension (see src/plus/ and plusdemos/ in repository at https://github.com/avidrucker/lccjs).

New Machine Instructions

Mnemonic Binary Format Flags Set Description
rand 1010 dr sr1 0 01110 none Generate pseudo-random number in range [dr, sr1] and store in dr
@avidrucker
avidrucker / string_funcs.md
Created June 5, 2025 01:14
Python string functions

Case Conversion:
.upper(): Converts a string to uppercase.
.lower(): Converts a string to lowercase.
.capitalize(): Capitalizes the first character of a string.
.swapcase(): Swaps the case of all characters in a string.
Whitespace Manipulation:
.strip(): Removes leading and trailing whitespace from a string.
.lstrip(): Removes leading whitespace from a string.
.rstrip(): Removes trailing whitespace from a string.
String Searching:

@avidrucker
avidrucker / independent_learning_phases_flowchart.md
Created September 22, 2024 17:17
a flowchart diagram depicting learning phases and how they may be disrupted and supported
flowchart TD
    A[Start] --> B[Phase 1: Self-Assessment & Goal Setting]
    B --> B1{Accurate Self-Assessment?}
    B1 -- Yes --> C[Phase 2: Resource Identification & Planning]
    B1 -- No --> B2[Failure Mode: Over/Underestimating Abilities]
    B2 --> B3[Strategy: Take Diagnostic Tests, Set SMART Goals]
    B3 --> B[Phase 1]
    
    C --> C1{Effective Planning?}
@avidrucker
avidrucker / EntityRelationshipDiagram.md
Last active July 19, 2024 15:05
Entity Relationship Diagram for Social Media Full Stack Application
erDiagram
  USER {
    integer id PK
    string username UK
    string fname
    string mname "optional"
    string lname
    string initials "initialized programmatically"
 string profile_color "initialized randomly"
@avidrucker
avidrucker / users_groups_files_oh_my.md
Created June 21, 2024 16:37
mermaid diagram showing relationships, permissions between Linux users, groups, files, including representation of set-UID and set-GID privileges
graph TD
    subgraph "USERS and GROUPS"
        User2(User 2)
        User1(User 1)
        User3(User 3)
        Root(Root User)
        Group1(Group 1)
        Group2(Group 2)
        Staff(Staff Group)
@avidrucker
avidrucker / index.html
Created June 10, 2024 18:40
Testing out highlight.js for the purpose of custom syntax highlighting LCC Assembly
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script src="https://unpkg.com/browse/@highlightjs/cdn-assets@11.9.0/languages/mipsasm.min.js"></script>
<title>Document</title>
</head>
@avidrucker
avidrucker / index.html
Created June 6, 2024 00:53
a test in pixelating an image using HTML Canvas
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pixelated Image</title>
<style>
html, body {
background-color: black;
}
@avidrucker
avidrucker / flashcard_system_erd.md
Created June 4, 2024 23:38
flashcards as they are used by Anki Spaced Repetition Software in 2024
erDiagram
    ERD_NOTES {
        _ notes "A user's data begins with making notes, which are themselves entries of data"
        _ note_types "Different note types can be made too. These determine what fields a note will have"
        _ cards "From a single note, multiple digital cards can be made."
        _ tags "Tags can be put on individual notes."
        _ notes_and_cards "For each note type, there is 1 associated card model"
        _ card_models "Card models store the CSS for a given note type."
        _ card_types "Each card model has 1 or more card types."
# Initial code referenced from https://github.com/robert/wavefunction-collapse
import random
import math
from typing import Literal
import colorama
# Types
Tile = str
Coordinates = tuple[int, int]
@avidrucker
avidrucker / guess3.a
Created March 24, 2024 00:10
Number guessing game with pseudo random seed written in LCC assembly
startup: bl main
halt
; function that ensures that user input
; is always between 1 and 100 inclusive
; the return value is saved into r0
getnuminrange: push lr
push fp
mov fp, sp