Giter Club home page Giter Club logo

rainbow-print's Introduction

Rainbow Printer!

screen-gif

Kako koristiti

Jednostavno. Potrebno je samo pokrenut compile.sh kako bi se dobio izvršni program. Nakon toga se samo pokrene "rainbow" program (npr. ./rainbow) i možete uživati u svom šarenom ispisu! jej!

Kako promijeniti tekst koji se ispisuje?

1. Način (siguran)

Potrebno je promijeniti vrijednost lokacije na koju pokazuje labela text_start

    text_start:
            .ascii "TestTest321\n\0"
    text_end:

u npr.

    text_start:
            .ascii "Ovo je cool!\n\0"
    text_end:

Nakon toga je potrebno opet pokrenuti compile.sh skriptu

2. Način (ne testiran)

Prvobitan plan je bio da korisnik unosi tekst koji želi da se ispisuje kao parametar programa. To nisam stigao još istestirat i to će biti dodano kasnije. Ali u teoriji, uz malo modifikacije bi trebalo već raditi.

Imamo dve sekcije koda koje se trebaju modificirat

... (iznad color_loop:)
    movl    $color, %ecx            # Adresa arraya escape sekvence
    #movl   ST_ARGV_1(%ebp), %edx   # Adresa početka glavnog teksta
    movl    $text_start, %edx
    movl    $0, %edi                # Brojač sekvence
...

... (u text_pointer_reset: nakon go_sleep:)
    #movl   ST_ARGV_1(%ebp), %edx   # Posstavimo ponovno pokazivač na
    movl    $text_start, %edx       # početak teksta
...

U obje sekcije koda je potrebno zamjeniti movl $text_start, %edx sa movl ST_ARGV_1(%ebp), %edx. To će napravit da program koristi prvi parametar programa kao glavni tekstualni pokazivač umjesto text_start: labele.

Nakon modifikacije koda, te sekcije bi trebale izgledati ovako:

... (iznad color_loop:)
    movl    $color, %ecx            # Adresa arraya escape sekvence
    movl   ST_ARGV_1(%ebp), %edx   # Adresa početka glavnog teksta
    #movl    $text_start, %edx
    movl    $0, %edi                # Brojač sekvence
...

... (u text_pointer_reset: nakon go_sleep:)
    movl   ST_ARGV_1(%ebp), %edx   # Posstavimo ponovno pokazivač na
    #movl    $text_start, %edx       # početak teksta
...

Nako toga, ponovno pokrenite compile.sh skriptu i pokrenite program sa sljedećom naredbom ./rainbow testtext. Program bi nakon toga trebao koristit "testtext" kao glavni tekst za ispis!

rainbow-print's People

Contributors

xunillen 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.