Code Monkey home page Code Monkey logo

8086-reading_text_count_occurrences_apply_cryptographic's Introduction

8086-Reading-text-Count-occurrences-Apply-Cryptographic

8086 Assembly code for read in input a short text of 4 lines, each of these lines long from 20 to 50 characters. Count number of occurrences of the letters and apply a cryptographic algorithm (Caesar cipher).

Reading

The program reads the lines with the instruction INT 21H and stores them in

first_line DB 50 DUP(?)

second_line DB 50 DUP(?)

third_line DB 50 DUP(?)

fourth_line DB 50 DUP(?)

End of Reading

Reading stops when one of these conditions is satisfied:

• After at least 20 characters, an ENTER has been read.

• 50 characters have been read without any ENTER, after the first 20 characters.

The ENTER character corresponds to 13 in ASCII table (if we read an ENTER in the first 20 characters, the reading must continue).

Number of occurrences

For each line, the program must count how many times a certain character appears.

I consider only letters, a...z, A...Z, discerning upper and lower case. For each line, output the most frequent character (appearing MAX times), print the list of characters appearing at least MAX/2 times. After each character printed, print also the number of occurrences.

Cryptographic algorithm

I print the text using Caesar cipher, only applied to a...z, A...Z characters.

Given parameter k, the Caesar cipher transforms the letter in a+k, considering the following pattern: a...zA...Za...zA...Z etc. (Non-alphabetic characters stay the same).

I chose k = 1 for the first row, 2 for the second, 3 for the third, 4 for the fourth.

Example with k = 3: piZza -> slcCd.

8086-reading_text_count_occurrences_apply_cryptographic's People

Contributors

sdibla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

donovan680

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.