Ahhh, i see - how does making any of it make sense to you ?
Printable View
Ahhh, i see - how does making any of it make sense to you ?
It's not that different from learning a new programming language. The first time you see it, it looks terribly complicated and doesn't make much sense, but once you understand it, it's easy to see how everything fits together.
Makes sense :) - how do you configure everything to work ? - computer perhaps ?
It depends. The timer is completely hardwired (in other words there's no software involved), so there's no computer involved.
The Z80 system does require a computer, because it needs to be programmed before it will do anything. I write the programs on my PC, and send them to the Z80 over the parallel port.
Once it's programmed, it runs independently--It doesn't need to be connected to my PC to run.
what languaged is used ?
- computer language (i doubt)
- other...
Z80 assembly. Here's what it looks like (this is the program that it's running in the picture):
That's the program that it's running in the picture.Code:org 0
LD SP, FFFFh ; init stack to top of ram
LD A, B8H ; program ppi
OUT (07H), A
LD A, 98H
OUT (03h), A
OUT (11h), A
LD B, 7Fh
CALL DELAY
OUT (11h), A
LD A, 01h ; clear display
CALL WRITEC
LD B,05h ; delay count in milliseconds
CALL DELAY
LD A, 0Ch ; display on, cursor off
CALL WRITEC
LD B,01h ; delay count in milliseconds
CALL DELAY
LD A,38H ; Set system (8 bits, 2 lines, 5x7)
CALL WRITEC
CALL DELAY
LD A,7
CALL GOTO
LD HL,MSG1
CALL PRINT
LD A,23
CALL GOTO
LD HL,MSG2
CALL PRINT
HALT
WRITEC: PUSH AF
OUT (05h), A
LD A, 02h
WFIN: OUT (07h), A
LD A, 01h
OUT (07h), A
LD A, 00h
OUT (07h), A
POP AF
RET
WRITED: PUSH AF
OUT (05h), A
LD A, 03h
JR WFIN
DELAY: PUSH DE
PUSH HL
LD DE,-1
LOOP1: LD HL,87
LOOP2: ADD HL,DE
JR C,LOOP2
DJNZ LOOP1
POP HL
POP DE
RET
; print a string terminated with $. Address stored in HL
PRINT: PUSH AF
PRT_LP: LD A,(HL)
CP "$"
JP Z,DONE
CALL WRITED
INC HL
JP PRT_LP
DONE: POP AF
RET
; go to position stored in A. 0-19 = line 1, 20-39 = line 2
GOTO: PUSH AF
SUB A,20
JP M,LINE1
ADD A,44
LINE1: ADD A,20
SET 7,A
CALL WRITEC
POP AF
RET
MSG1 DB "Blake's$"
MSG2 DB "Conflabatorium$"
WOOOOOOOOOOOOOO, how many different things can you do with that sort of code ? eg tih html you can create tables write on the page adjust other things...
Assembly is a very low level language. It's basically machine language written in a way that humans can understand (words instead of 0's and 1's). It's not related to web design.
I understand all of that :), what i meant was what different things can be done with that "language" (html scripting was just an example of what one language in itself could do...)
If a computer can do it, it can be done in assembly. The problem is that with complicated tasks, assembly code gets immensely complicated and completely unreadable. That's why we have higher level languages, like C++.