Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 45

Thread: New toys!

  1. #21
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ahhh, i see - how does making any of it make sense to you ?

  2. #22
    Join Date
    Feb 2007
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.
    "Rock and roll ain't noise pollution." - AC/DC

    http://www.blake-foster.com

  3. #23
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Makes sense - how do you configure everything to work ? - computer perhaps ?

  4. #24
    Join Date
    Feb 2007
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.
    "Rock and roll ain't noise pollution." - AC/DC

    http://www.blake-foster.com

  5. #25
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    what languaged is used ?
    - computer language (i doubt)
    - other...

  6. #26
    Join Date
    Feb 2007
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Z80 assembly. Here's what it looks like (this is 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$"
    That's the program that it's running in the picture.
    "Rock and roll ain't noise pollution." - AC/DC

    http://www.blake-foster.com

  7. #27
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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...

  8. #28
    Join Date
    Feb 2007
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.
    "Rock and roll ain't noise pollution." - AC/DC

    http://www.blake-foster.com

  9. #29
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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...)

  10. #30
    Join Date
    Feb 2007
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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++.
    "Rock and roll ain't noise pollution." - AC/DC

    http://www.blake-foster.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •