4/13/17

boot.bin part 2 - function

I currently program boot.bin (monitor program).
It is good to have a fix and improve the function .... However, the address of the function is changed accordingly (sometimes)

In order to make the same binary operate in various environments, it is necessary to fix the address,
Tentatively, addresses are fluctuating during development.
This can not be helped.

So I will show how to use the current boot.bin to make software development smooth.

z80asm

The assembler I use is z80asm.
This is running on Raspberry Pi.
(I am developing all i8080 emulators with Raspberry Pi.)

Z80asm is a powerful z80 assembler with macro function.
Unfortunately it does not correspond to the opcode of 8080 ....
The lucky thing is that the codes of 8080 and Z80 are almost identical, so you can use it!


Display the label list of boot.bin.

As below
z80asm monitor.asm -L 2>monitor.h

This will write the label and address of monitor.bin to monitor.h.
The method of using monitor.h is simple.

At the beginning of your new assembler file
include 'monitor.h'
Just to do this.

You can call that label if you have a function you want to call, looking at the assembler source of monitor.asm (there is function.asm below "include").

4/11/17

boot.bin

It is a story of boot.bin for the i8080 emulator I registered with github.

This includes the code of the front panel (input interface) using mcp 23017.
In my opinion, if you are writing 8080 code without assuming hardware, we recommend adding the necessary hardware.
(Sometimes you could also write Arduino code)

In my prototype ... I am using MCP 23017 and i2c OLED 1602 display using the input interface.

This will cause the size of boot.bin to be different.
This may cause problems.

The address of the general-purpose function changes, so software compatibility can not be maintained.

Currently I am modifying boot.bin.
As much as possible, so that software can be used in common.

4/5/17

Altair I/O

This is for my learning.

output


  • 0x01 : output to terminal
  • 0x08 : select disk
  • 0x09 : disk function
  • 0x0a : disk write
  • 0x10 : 2SIO port 1 control
  • 0x11 : 2SIO port 1 output
  • 0x12 : ?

input


  • 0x00 : ? return 0
  • 0x01 : input from terminal
  • 0x08 : disk status
  • 0x09 : disk sector
  • 0x0a : disk read
  • 0x10 : 2SIO port 1 status
  • 0x11 : 2SIO port 1 read
  • 0xff : sense switches

and, in and out derections, in 4k basic.

out     (44h),a         ; 010b  d3 44 
in      a,(0)           ; 0377  db 00 
out     (1),a           ; 037f  d3 01 
in      a,(0)           ; 0382  db 00  
in      a,(1)           ; 0389  db 01  
in      a,(0)           ; 0473  db 00 
in      a,(1)           ; 0d28  db 01 
in      a,(0ffh)        ; 0d34  db ff  
in      a,(0ffh)        ; 0d45  db ff  
out     (10h),a         ; 0d8b  d3 10

0x44 in the first line may be part of the data.
Yes, I understand about other lines.

I need to investigate this binary further.


out (xx),a

000000c0 4e d4 41 42 d3 55 53 d2 53 51 d2 52 4e c4 53 49 
00000100 4f c4 46 c3 4f d6 4f cd 55 d3 42 d3 44 c4 2f b0
These are data

00000370 cc 8a 05 3c 32 27 00 db 00 e6 80 c2 77 03 f1 d3
00000380 01 c9 db 00 e6 01 c2 82 03 db 01 e6 7f c9 cd 9d 
00000930 d1 ef ca d3 01 2e ff cd 9b 09 34 34 2b 7e 32 60  
00000d80 35 cd 8b 0d 35 35 35 21 8c 0d 34 d3 10 c9 62 68 

in a,(xx)

00000370 cc 8a 05 3c 32 27 00 db 00 e6 80 c2 77 03 f1 d3 
00000380 01 c9 db 00 e6 01 c2 82 03 db 01 e6 7f c9 cd 9d 
00000470 01 eb c9 db 00 e6 01 c0 cd 82 03 fe 03 c3 f7 01 
00000bc0 12 0a eb e1 70 23 c1 0d c2 9b 0b 05 ca db 0b 2b 
00000c90 0a 52 c7 4f 80 cd 02 0a 01 49 83 11 db 0f cd 12 
00000d20 00 21 1a 0f f9 22 63 01 db 01 0e ff 11 8e 0d d5 
00000d30 3a ff 0f 47 db ff 1f da 41 0d e6 0c ca 42 0d 06 
00000d40 10 78 32 8c 0d db ff 17 17 06 20 11 02 ca d8 17 

Although it does not know whether it is OpCode or data by this alone, it is possible to grasp the position of code like OpCode.

However.
4kbasic may work by mapping I / O like Altair 8800 rather than modifying binary.

Do you need it?
This is easy to realize is additive.
Simply
Just modify machine.cpp.