Monday, October 18, 2021

Getting Started with Python Programming as an absolute beginner with Thonny IDE

 Hello Everyone ✊,

Getting started with python programming or python scripting might be complicated if you head in the wrong direction. As an absolute beginner with no prior experience in any programming language or just a little experience with HTML scripting, python programming seems a lot.

If you google getting started with python as an absolute beginner, you will get hundreds of thousands of results. That's complex. You need a good user-friendly IDE (Integrated Development Environment) and have python installed on your pc

All you need to do is download an IDE name (Thonny). It is the simplest IDE available for python programming as an absolute beginner. It offers a lot of features that are very useful and will improve your programming skills.

Go ahead and download it by click on (Thonny). after you have downloaded thonny, you need to install it by clicking setup. When you install thonny python programming language automatically installs with it, you don't need to install it separately.

Thonny offers various features like syntax highlighting for code and comments, tabbed programming for parallel coding, and much more. If you are working on a python programming project and you need to install any package, thonny also offers package installation very quickly. You don't need to visit any website to install any python package. all you need to do is just go to Tools >> Manage Package >> then the following window will appear

How_To_Install_Python_Packages_In_Thonny














On the right side, you will see the name of packages that can be installed right away; if you want to search any python package that is not listed, you can type in the search bar and hit search on PyPI. after you have searched all you need to do is to hit install. You just install a python package without using any complex pip command


One more important feature of thonny is debugging, which we will discuss in upcoming sections.


If you find this helpful, rate us and like us.

Friday, October 8, 2021

How To Print A Single Character in 8086 Assembly Language

 If you are getting started with 8086 assembly programming, you might encounter the elementary and very beginning program of your life, which is “how to print text in 8086 assembly language”. However, in most cases, the next step is to print a single character in the 8086 assembly language.


In an 8086 assembly language computer always works with registers of the microprocessor. in intel’s 8086 microprocessor, there are four basic general-purpose or data registers i.e.


Accumulator Register (AX)

Base Register (BX)

Counter Register (CX)

Data Register (DX)


Above mentioned registers are 16bit registers which means they consist of two bytes. These registers are further broken into ‘high byte’ and ‘low byte'. We can use them for any purpose we want. Look at the table below.



8086_General_Purpose_Registers


There are other types of registers as well, but for now, we will stick to them.



Now that we have an overview of Data registers, we can now write a simple assembly language program that prints single character output. 


First, we write our basic program template, which does nothing but is very important and will always be used in each assembly program.


TITLE SINGLE_CHARACTER_PRINTING

.MODEL SMALL

.STACK 100H

.DATA


;;THIS IS DATA SECTION



.CODE   


;THIS IS CODE SECTION

    MAIN:

        MOV AX, @DATA

        MOV DS, AX

        

        

            

        

        

        MOV AH, 04CH

        INT 21H

   END MAIN


If you don’t understand or want to understand more basics, you can follow this link for the instructions used in this program.


In the 8086 assembly language, a single character means one byte. Let’s say we want to print ‘A’ first, we need to move it to the data register, which is DX, and ‘A’ is one byte so that we will place it in the DL register. If you are confused, remember that if you want to print a single character, always move it to the ‘DL’ register.



MOV DL, ‘A’

MOV AH, 02H

INT 21H


Just add three lines in the above code, and you will see the output of the program. If you don't understand MOV AH, 02H and INT 21H, just go with it as at this point there is no need to get stuck to it. Just remember we write these three statements to display a single character. You just need to replace the ‘A’ in DL if you want to print something else.


Following is the complete code of above program


TITLE SINGLE_CHARACTER_PRINTING
.MODEL SMALL
.STACK 100H
.DATA

;;THIS IS DATA SECTION

.CODE   

;THIS IS CODE SECTION
    MAIN:
        MOV AX@DATA
        MOV DSAX
        
        MOV DL'A'
        MOV AH02H
        INT 21H
                        
        MOV AH04CH
        INT 21H
   END MAIN

You should see output of the program as 'A'


If you have any question or trouble you can always choose to click Ask for Help section mentioned above.

Complete Video Tutorials