ASM80: Debugging stuff

 My projects, Programming  Comments Off on ASM80: Debugging stuff
Dec 032017
 

I have revisited the ASM80 integrated debugger. I mean that part you can use when try to EMULATE any common code.

The part I have focused on is the upper part with the memory. Here is a change list:

  1. You can click on a memory cell and enter a new value to fill in.
  2. You can scroll memory up and down by mouse wheel.
  3. You can fill a block of memory with three input boxes right under the memory block. From left: FROM, TO, VALUE. Enter appropriate values and click on FILL
  4. You can enter a string or a list of numbers into memory at given addres. The last line provides this functionality. Simply enter the address, from you want to enter into memory, and click to STR (entering ASCII string) or NUMS (entering numbers – comma-separated list).

Have fun and enjoy!


ASM80: New directives, some fixes, new login system

 My projects, Programming  Comments Off on ASM80: New directives, some fixes, new login system
Sep 162017
 

Hello folks, as you can noticed, there is some progress with ASM80.com online IDE and compiler.

Last time I have introduced new features: generic emulator and assembler toolkit.

Today I would like to introduce some features you will love, I guess…

First of all: ASM80 Manual, published with GitBook. Enjoy!

Directives

I have added three directives: .cstr, .pstr and .istr. All of them is suitable for defining a string, like DB “blahblah”, but:

.cstr When you need write a zero-ended string (C style), you can use DB "Hello",0 – or simple .cstr "Hello"
.pstr Similar as .cstr, but there is no trailing zero. .pstr is a Pascal-style string: first byte is length, then string. So .pstr "Hello" is equal to DB 5, "Hello".
.istr Strings are often defined as simple ASCII, where the last byte has bit 7 set to 1. So .istr "Hello" is the same as DB "Hell","o"+0x80

Terminal capturing and transmitting

With Generic Emulator you can now easy capture terminal out to the text file (press “capture” under the display, press again to stop capturing and save file). You can send file to terminal too, just click to the file name with RMB and select “Send to terminal”

New login system

I have decided to deprecate old login system, it was not good. From now you can log in with GitHub account, Twitter account, Google account or Facebook account. You can link more such accounts together, of course. Your workspaces is now saved in Firebase DB. Your old workspaces are preserved, but it requires old way of login, so I recommend to save them into the new system.

Bug fixed

There was a bug in a .block feature – in some circumstances with 6502 code assembler can decide to use shorter addressing mode, so .block can be moved during the evaluation passes to another address. Now assembler reflect these changes and provide true addresses for inner @labels.

Assembler toolkit

 My projects  Comments Off on Assembler toolkit
Sep 092017
 

Wanna convert HEX to series of DB? Or binary file to series of DB? Or wanna convert them to the JavaScript Array form? Or you have a LST file and want to convert it to ASM, so trim first 20 (or 16, or 18, or 32) characters? It’s easy with the ASM80 Tools.

A lot of cool modules and sensors…

 Circuits, Microcontrollers, Microprocessors, My projects, Other  Comments Off on A lot of cool modules and sensors…
May 212017
 

I am buying electronic stuff from AliExpress – due to the ******* custom policy of EU it is a much cheaper than buying from Adafruit, Sparkfun etc. Unfortunatelly. There is a lot of total crap, but also a lot of great stuff too. I am diving into AliExpress three times a week, and I found many pieces “I really have to build”. So I decided to share these tips with you and made a new web called Alitronik.

There are three tips per day at Alitronik, and each sunday is “a Funday” – a day for tips with something in common. For example – the last one is dedicated to solar power, energy metering, weather stations and lasers. Previous week was in the sign of Raspberry Pi cases, tools, robots and construction of 8085-based mini PC.

From the recent post I want to mention e.g. 37 sensors kit, CC-A80 Cubieboard PC, Speech Recognition Module, LoRa Shield for Arduino, NodeMCU-32S or SMD Tweezer and multimeter tool.

So – bookmark Alitronik.com, read Alitronik RSS, follow @alitronik_tips, subscribe weekly digest or submit your own tips.

Assembler for 8080, Z80, 6502 and much more…

 6502, Microprocessors, My projects, Programming, Z80  Comments Off on Assembler for 8080, Z80, 6502 and much more…
Nov 272016
 

Readers certainly know my ASM80 – online assembler / IDE for eight-bit processors. I made several derived versions, like single page compiler, embedded version of the translator (I used it in tutorial Stroják.cz), or a stand-alone IDE. The good old command line assembler is here now too.

The prerequisite you have to meet is a functional Node.js environment. It is not complicated, it exists for all major platforms, and you can download it here: nodejs.org. During installation, package manager called NPM is installed too.

NPM is used for install the packages and libraries. To install ASM80 itself just run a command prompt and type:

-g causes the asm80 will not be installed as a library, but as a system tool. Then toy can invoke it as a standard command line utility:

launches translation for file test.a80 and the result will be two files: test.hex with output and test.lst with the translation protocol. Extension .a80 tells the compiler to use the processor’s instruction set for Intel 8080 CPU.

Behaviour can be influenced by parameters. You can set the output file name, you can suppress the generation .lst, or explicitly determine the processor type and format of the output file (besides HEX and S record it can output .COM files for CP/M, .PRG for C64 emulators, or SNA and TAP for ZX Spectrum).

Options are:

  • -o, --output <file> Output file name
  • -t, --type <type> Output type [default: hex]. Available types are: hex, srec, com (for CP/M), sna, tap (for ZX Spectrum), prg (for C64)
  • -n, --nolist Suppress listing (.lst file)
  • -m, --machine <type> Processor type, one of the following: Z80, I8080, C6502, C65816, CDP1802, M6800, M6809
  • -h, --help See HELP

Machine type can be omitted. Right CPU is determined by file name extension (-m option overrides this decision).

  • Intel 8080: .A80
  • Zilog Z80: .Z80
  • Motorola 6800: .A68
  • Motorola 6809: .A09
  • MOS 6502: .A65
  • WDT 65816: .816
  • CDP 1802: .A18

These parameters are described on page NPM package ASM80.

Overview of the syntax and directives can be found on GitHub Pages.

I still have a few suggestions for improvements, I would like to know your opinion …

  • Create a library system, as it has the classic assemblers, which separates translation and linking. So users will have the opportunity to make a library of subroutines, which would include only those parts of the code that are necessary for proper function. You can easily make something like the “standard C library” for your system …
  • Having the opportunity to directly link public code, for example on GitHub.
  • … More processors? Systems?

Thanks for the tips and suggestions. You can send them straight to the GitHub Issues.

Dec 282015
 

Hello from ASM80. Recently (a ten minutes ago, to be honest) I have added a support for WDC’s 65C816, the 6502 sequel with hybrid data width (8/16 bits). It is used in some notable computers, such as Apple ][gs, Nintendo’s SNES or SuperCPU extension for C64.

Due to its dual data width, I have to added some new directives to specify index / accumulator width. You have to specify it directly with:

Directive Meaning
.m8 Accumulator is 8bit
.m16 16bit accumulator
.x8 index register is 8bit
.x16 16bit index

65C816 added new addresing modes. The main innovation are “long” modes with 24bit addresses, e.g. JMP $123456. Such instructions are compiled in 4 bytes, e.g.  “5C 56 34 12”.

I believe (the word “believe” is important) it should work without any problems, but I warmly appreciate any feedback.

The 65C816 assembler is early beta, so I decided to release it as a single page assembler as this moment instead of full support in IDE. You can try it here: ASM65816 single page assembler. Please do not hesitate to send any feedback or bugreports to my mail asm80@maly.cz Thanks.

banner