Tag Archives: assembler

Assembler trick: inline strings

Quite often, we need to send strings to a computer. Usually, there is a section in your code where you define the message with a label: ;string is terminated with null MsgHelloWorld: .asciz “Hello World!\r\n” ;subroutine to print strings putstr: … Continue reading

Posted in assembler, Software, Z80 | Tagged , , , | Leave a comment

Assembler trick: call by falling through

On several occasions, when programming in assembler, we meet this sequence where the last instruction of a subroutine is a call immediately followed by a return instruction. my_subroutine1: ;some instructions call my_function1 ret my_function1: ;some instructions ret The routine ‘my_function1’ … Continue reading

Posted in Software | Tagged , | Leave a comment

Floating point routines for Z80 in assembler follow-up

I finished the math routines and added some others for doing trigs and logs with the CORDIC algorithms. I made it run on a real Z80 and a TRS80 emulator.

Posted in Electronics, Z80 | Tagged , , , | Leave a comment

AVR Studio 6, assembler error: unexpected symbol

This occurred inside a macro directive. All was all right in the macro, and the error location followed the macro when moving it elsewhere. The fault was the invocation of the macro that was missing commas between parameters.

Posted in Software | Tagged , | Leave a comment

Floating point routines for Z80 in assembler

I’m currently writing some floating point routines in assembler for the Z80. I started a long time ago with a book from Neill Graham. The title is “Microprocessor Programming for Computer Hobbyists”. Tab Books No. 952 ISBN 0-8306-6952-3. The routines … Continue reading

Posted in Electronics, Software, Z80 | Tagged , , | Leave a comment