Z80 Programming with no RAM! Crazy but challenging Mastermind game

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 พ.ย. 2024

ความคิดเห็น • 8

  • @PebblesChan
    @PebblesChan 3 ปีที่แล้ว +3

    RAMless operation with the 8080 or Z80 is commonly used for Diagnostic or POST (Power On Self Test) ROMS. Contrary to immediate assumptions, the Stack Pointer along with instructions like CALL, RET, POP, EX (HL),SP can be used in RAMless programs/systems for using read only data and pointers.

  • @ninjazhu
    @ninjazhu ปีที่แล้ว

    You can use the stack as a table and as a list of addresses, although you can't push you can still pop from a predefined stack. You can predefined the stack with lists of subroutines to call, and simply call each by using ret. To set a new list of subroutines simply set sp to the new list. You can also put data on the stack and use sp to read the data by popping it.

    • @ReadyZ80
      @ReadyZ80  ปีที่แล้ว

      Great ideas of using stack functionality with fixed lists

  • @joellagerquist1791
    @joellagerquist1791 3 ปีที่แล้ว +2

    There is a way to do this without the jump. You duplicate the bit that moves from one register to the other into the carry flag. I learned this in a class where we had to implement a SRA instruction on an 8080 that doesn't have it. Only 2 people got the simple, yet tricky, solution of using the carry. This problem is similar. RLC E; RR E; RL D; RL E. The RLC duplicates bit 7 into the carry so the RR will put E back to as it was, but now bit 7 is in carry too. RL D puts E's bit seven, now in carry, in bit 0 of D. RL E gets D's bit 7 into it's bit 0.

    • @joellagerquist1791
      @joellagerquist1791 3 ปีที่แล้ว

      I should have mentioned I was looking at the 16 bit shift code.

    • @ReadyZ80
      @ReadyZ80  3 ปีที่แล้ว +1

      Thanks for sharing this well explained solution. I'm somewhat literal when I code and probably under utilise the carry flag. I'm surprised how little shift/rotation content is out there.

  • @PHILG2864
    @PHILG2864 2 ปีที่แล้ว

    This is just a trial comment as my previous attempts have been removed for some unknown reason. This video interests me because I did a ramless Z80 design for Ham Radio Today magazine in Jan/June 1987, it read morse code and RTTY for ham radio enthusiasts. Ok lets see if this comment gets deleted :) ...

    • @ReadyZ80
      @ReadyZ80  2 ปีที่แล้ว

      Yes...The Lords of TH-cam didn't delete this!