Giter Club home page Giter Club logo

boothsalg_z80asm's Introduction

BoothsAlg_Z80Asm

Description:

A simple assembly program for a Z80 processor that performs Booth's Algorithm on two 8-bit numbers and gives a 16-bit result.

Tested with WinAPE Amstrad CPC Emulator. WinAPE is useful, since it includes a basic editor, assembler, and debugger.

The program is pretty basic and does not have any form of input or output with the user. The input must be hardcoded into the assembly program, and the output must be read from the registers.

To run the program:

  1. Open WinAPE, select "Assembler" in the taskbar, and select "Show Assembler" (F3)
  2. Towards the top of the program, under "Symbol Definitions", there are two constants, the multiplicands. Change these to whatever two numbers you wish to multiply. Keep in mind that you're limited to 8 bits in 2's complement notation, so a minimum of -128 and a maximum of 127.
  3. Insert a breakpoint at the final line with the "nop" instruction. This can be done by clicking on the left side of the window next to the instruction.
  4. In the asssembler, open the assembly file you wish to run. Select "Assemble" in the tasbkar, and select "Assemble" to assemble the program for the Z80 and emulator.
  5. The program was assembled and placed into memory location &8000. To run the program, type "Call &8000". If the breakpoint was placed, the debugger will open, and the results of the multiplication can be seen in hexadecimal format in the HL register pair.

boothsalg_z80asm's People

Contributors

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