Recent Forum Posts
From categories:
page 1123...next »

I've begun the process of updating it. It's going to be a total overhaul, so I've been editing a draft of the new page. It is going to be a while :|


Z80 Assembly>English>TI-BASIC>Python>French>C>0

Re: Advanced Math by Xeda ElnaraXeda Elnara, 09 Aug 2017 17:05

I started this, it is not yet complete, but I submitted what I have completed.

Edit: For the most part, complete.


Z80 Assembly>English>TI-BASIC>Python>French>C>0

Re: The Application Header by Xeda ElnaraXeda Elnara, 08 Aug 2017 13:54

I'm sorry, I'm strapped for time so I can't help just yet— maybe in a few weeks.

This page is in need of an overhaul and while I want to keep the cheeky language, it's absolutely incorrect about a few key points. Application headers are restricted to 128 bytes, but only as an upper limit. A minimum header is a few dozen bytes. An example here is 32 bytes and could be less depending on the size of the app name.:

.org $4000
.db $80,$0F, 0,0,0,0
.db $80,$12, $01,$04    ;signing key ID
.db $80,$47, "AppName" ;change the $47 according to name len (last nibble is the length).
.db $80,$81, 1          ;num pages
.db $80,$90             ;no splash
.db $03,$22,$09,$00     ;date stamp
.db $02,$00             ;date stamp signature
.db $80,$70             ;final field
appstart:

Z80 Assembly>English>TI-BASIC>Python>French>C>0

The Application Header by Xeda ElnaraXeda Elnara, 07 Aug 2017 01:33
Zeda Thomas (guest) 03 Aug 2017 19:23
in discussion Hidden / Per page discussions » Advanced Math

It has been years since I updated this and some of these routines are making me cringe (and some I'm fairly sure are wrong). This page needs a serious update at some point when I get time and I'm not using a phone.

I must have been practically a heathen when I made these routines XD

I have better algorithms and faster codes, comment if you need something or if I forget to edit.

by Zeda Thomas (guest), 03 Aug 2017 19:23

Replying to my own post! :-) Seems I can't edit it.

Anyhow I was in error about the flashing address lines begining at 256… actually 128 . Still stumped. :-)

Amanda

Hi All! I just joined the site to hopefully gain some insight into the workings of the Z80. I'm hoping I can build a basic computer around the Z80.
To this point, I've bread-boarded a circuit to verify the CPU iis functioning properly. So far this seems to be the case.
The data lines are all tied low to effect a NOP instruction. All the address lines are driving LEDs through 74LS244 driver ICs.

However, there is something that puzzles me. The address lines count up normally to 65535, but when the count passes 255 any active line from A8 through A15 flashes. The flashing is the same frequency as M1, but opposite… M1 on, A8 - A15 off and vice versa.

I'm stumped. I've downloaded about a ream of documents on the Z80, but I'll be darned if I can see anything to unravel this. I've watched numerous videos about testing the CPU, but no one ever seems to monitor more than 4 or 5 address lines.
I suppose this is normal behavior for some reason given the limited setup I'm using.

Anyone have any thought on this? I'd be grateful!

Amanda - Have a great 4th!
(July 4th - alcohol and explosives. What could wrong?) :-)

Z80 Address Line Functioning by ajwardajward, 01 Jul 2017 18:16

new members!!! Well, that'd be me I guess! I just joined in the hope of learning more about the Z80.
I've started to explore the possibility of building a basic computer using the Z80. So far, I've built a tester to verify the CPU is functioning correctly and I "think" everything is okay. I'll have questions tho', but I'll address those in another area.

Happy to be here.

Amanda

Re: new members!!! by ajwardajward, 01 Jul 2017 17:34
Zilch (guest) 27 Jun 2017 03:59
in discussion Coding Forums / z80 programming » Read Back program memory

Older processors such as the Z80 did not have any onboard memory, so there is nothing to "read back".

If your system has EPROM (separate non-volatile memory chips, then the contents of these can easily be read out.

Zilch

by Zilch (guest), 27 Jun 2017 03:59

If you would like, you can add that to the end. It only applies to the eZ80, though (not the Z80).


Z80 Assembly>English>TI-BASIC>Python>French>C>0

This could add a note that the contents of the B register are used as the upper byte of the port number for the (C) version, and the contents of A used as the upper byte for the fixed port version.

Could add the role of B by Piala AlicePiala Alice, 04 Jun 2017 18:38

On the newer models there is:

  • More RAM
  • More Flash
  • A different screen
  • An eZ80 processor

As a result, you'll need to use different graphics routines, and you'll need to use an updated list of addresses for built-in routines (which are now called instead of bcalled).

For the most part, the instruction set is backwards compatible (including an on-chip Z80 mode). However, instruction timings are different and with the introduction of new and more efficient instructions, many of the routines found here can be further optimized.

For the new system calls and addresses, you'll want to check out wikiti.


Z80 Assembly>English>TI-BASIC>Python>French>C>0

Calculator Compatibility
Benjamin (guest) 25 Apr 2017 05:18
in discussion Coding Forums / z80 programming » Calculator Compatibility

I noticed in your basic tutorials on assembly programming that you often reference the TI-83 Plus in set-up downloads and programming but alternate paths for newer calculators are not clear. I was wondering how cross-compatible these tutorials were to newer calculators — especially the TI-84 CE — and what modifications if any were necessary to begin programming in assembly.

Calculator Compatibility by Benjamin (guest), 25 Apr 2017 05:18

Hi,

Firstly, I haven't looked at Z80 assembly since my childhood back in the late 80's. Whilst I'm quite competent in modern languages, Z80 assembly is something I've never revisited until I recently built a Z80-based single board computer. This runs a version of NASCOM BASIC, which is itself based on Microsoft BASIC from way back in '78.

Now I've got the computer up and running, I'm taking a break from building the next piece of hardware to add to it and instead focusing on the software for the moment. I'd like to make a few (relatively minor) changes to the BASIC interpreter running on the ROM, and in the process learn something about Z80 assembly etc.

What I'm currently trying to do is make the error messages a little more verbose. My first computer was an Amstrad CPC464, so naturally I'm trying to make the BASIC a little more like what I'm used to (already changed the OK prompt to READY.)

I'm hitting a problem with the error messages though. In its untouched form, the error messages are two-character bytes, like so:

ERRORS:     .BYTE   "NF"            ; NEXT without FOR
            .BYTE   "SN"            ; Syntax error
            .BYTE   "RG"            ; RETURN without GOSUB

Now the following lines of code handles printing a message:

ERROR:      CALL        CLREG           ; Clear registers and stack
            LD          (CTLOFG),A      ; Enable output (A is 0)
            CALL        STTLIN          ; Start new line
            LD          HL,ERRORS       ; Point to error codes
            LD          D,A             ; D = 0 (A is 0)
            LD          A,'?'
            CALL        OUTC            ; Output '?'
            ADD         HL,DE           ; Offset to correct error code
            LD          A,(HL)          ; First character
            CALL        OUTC            ; Output it
            CALL        GETCHR          ; Get next character
            CALL        OUTC            ; Output it
            LD          HL,ERRMSG       ; "Error" message
ERRIN:      CALL        PRS             ; Output message

Now initially (and somewhat naively) I thought I could just change the 2-character bytes in ERRORS: from, e.g. "SN" to "Syntax" - the word " Error" is added after each error message. I soon realised that this wasn't working, as there's a lookup table listing the location of each error message. Once I found that, all seemed to be roses for a while. I changed the code above so that instead of printing 2 characters and then moving on, it would loop through printing characters until it hit a 0.

; BASIC ERROR CODE VALUES

NF          .EQU    00H             ; NEXT without FOR
SN          .EQU    02H             ; Syntax error
RG          .EQU    04H             ; RETURN without GOSUB
OD          .EQU    06H             ; Out of DATA
FC          .EQU    08H             ; Function call error
OV          .EQU    0AH             ; Overflow
OM          .EQU    0CH             ; Out of memory

I added a zero to the end of each message in ERRORS: and changed the 2-char message to a more verbose one (so .BYTE "NF" became .BYTE "NEXT without FOR",0). I then amended the BASIC ERROR CODE VALUES lookup table (above) to take the length of the verbose error messages into account.

Everything was fine for the first few error messages. I'd tested the system and it worked. So I changed the rest of the error messages and updated the lookup table. Some of the values went as high as 124H etc, and I found I had to add a 0 to the lower offsets to avoid errors in TASM. However, I then started getting other errors - unused MS data errors in lines like LD E,(OS). I suspected this was because the offset was too large for a single 8-bit register like E, so where the errors came up I changed the code to LD DE,(<error msg offset label>) to make use of the full 16-bit DE register.

Obviously that didn't work - it stopped my ROM completely and locked the computer up. So, my long-winded question is winding to its conclusion - I don't currently know enough about assembly or the Z80 registers or the BASIC code I'm editing to know what I did wrong and why it was locking up the computer. I suspect this next bit of code is the culprit - taken from the message printing code further up:

LD          D,A             ; D = 0 (A is 0)
LD          A,'?'
CALL        OUTC            ; Output '?'
ADD         HL,DE           ; Offset to correct error code

If the error offset is loaded into E, then the first line above doesn't mess with it. But if, after I changed it to load into DE, D is then changed by the above code snippet, then the offset is going to be corrupted. Should I just remove the LD D,A line and the two after it as I'm not bothered about having the ? mark at the start of the error message either…

I honestly can't find anything. I know it's a pain, but you might have to find a more current compiler and port the code. It can't be that much different syntax. I hope it's not :/


Z80 Assembly>English>TI-BASIC>Python>French>C>0

Re: Z80 compiler question by Xeda ElnaraXeda Elnara, 10 Mar 2017 18:00

The compiler I need is the Archimedes C ver3.1.

Does anyone know where I can get that version?

Thanks,

Doug

Re: Z80 compiler question by DB123DB123, 10 Mar 2017 17:41

I have some more clues.

The compiler command was "cz80 sourceFileName"
The linker command was "linkz80 sourceFileName"

Does that help identify the toolchain that was used originally in the real early 90's?

Doug

Re: Z80 compiler question by DB123DB123, 06 Mar 2017 15:42

Ooooh, yes. When you said 'compile assembly' I took that as an assembler XD um, I think small-C had a variant for the Z80 called Z88DK. Small-C is from the early 80s.


Z80 Assembly>English>TI-BASIC>Python>French>C>0

Re: Z80 compiler question by Xeda ElnaraXeda Elnara, 06 Mar 2017 14:50

I went to: z80.info and downloaded the TASM V2.9 from March 92. It looks like TASM is for assembly code and not C code. I should have mentioned that the source code I have is C code. Did Borland support the Z80 processor in 93? Any idea what compilers for C code would have been available in 1993?

Thanks,
Doug

Re: Z80 compiler question by DB123DB123, 06 Mar 2017 14:47

I can't remember when TASM was released, but that is a likely candidate. I think Zilog's site has a list of assemblers. Sorry, I'm on mobile so it's a pain to verify.


Z80 Assembly>English>TI-BASIC>Python>French>C>0

Re: Z80 compiler question by Xeda ElnaraXeda Elnara, 05 Mar 2017 21:57

I have piece of hardware with a functioning Z80 that was first created in in early 1993. I do have the source code but no documentation. Would anyone know how many compilers there would have been in 1993 for a PC that would compile Z80? I want to be able to compile this project and make some changes to it but I have no idea what it was created with.

Thanks,
Doug

Z80 compiler question by Doug B (guest), 05 Mar 2017 21:32
page 1123...next »
Unless otherwise stated, the content of this page is licensed under GNU Free Documentation License.