Giter Site home page Giter Site logo

8086assembly-pixel-generator's Introduction

Pixel Drawer

This is a simple Python script that allows you to draw pixels on a 32x32[src/gen32x32.py](or set your own gen.py) grid using various colors. The grid is represented in the terminal, with colored blocks representing pixels. When you're done drawing, the program generates 8086 assembly code that reproduces your drawing.

How to run

  1. Install requirements python3 -m pip install -r requirements.txt

  2. Run the script python3 -m src/gen

How to use

Run the Python script in your terminal. You will see an empty 32x32[src/gen32x32.py](or set your own gen.py) grid. You can set a pixel's color by entering its coordinates (x and y values) and a color code, separated by spaces. Here is an example:

Enter x, y and color to set a pixel (x y color), or 'q' to quit: 5 5 7

This will set the pixel at coordinates (5,5) to white. The updated grid will be printed to the terminal immediately.

To quit the program and generate the assembly code, simply enter 'q' at the prompt:

Enter x, y and color to set a pixel (x y color), or 'q' to quit: q

Color codes

The color codes and their corresponding colors are as follows:

  • '0': Black
  • '1': Blue
  • '2': Green
  • '3': Cyan
  • '4': Red
  • '5': Magenta
  • '6': Brown
  • '7': White
  • '8': Gray
  • '9': Light Blue
  • 'a': Light Green
  • 'b': Light Cyan
  • 'c': Light Red
  • 'd': Light Magenta
  • 'e': Yellow
  • 'f': Bright White

Please note that the actual colors displayed may depend on your terminal's color scheme.


8086assembly-pixel-generator's People

Contributors

jaseunda avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.