litterbox99
Experienced Member
- Joined
- Aug 8, 2010
- Messages
- 103
Now that my SSM IO4 card is working, I've been trying to
find a boot loader for Basic. There's a youtube video of an
Imsai loading basic, displaying incoming bits on the 'programmed
output' LED's that would be perfect for my needs, but no code is listed.
I've been googling and reading for days now and the only thing I have
found is loading Basic on an Altair.
http://www.solivant.com/
It looks like this is specific to certain Altair I/O boards the way it's
coded in the second stage, but I gave it a try anyway.
I changed to code to reflect my I/O ports and removed the code
to initialize the serial card as the SSM uses AY3-1015D.
Here's my code and comments as I understand it;
0010 0001 21 041 lxi H, 0FAEH ;Set stack to
1010 1110 AE 256 ;L = AE
0000 1111 0F 017 ;H = 0F
0011 0001 31 061 lxi SP, stack ;Set top of stack
0001 1010 1A 032
0000 0000 00 000
1101 1011 DB 333 input ; Check status bit from port;
0000 0010 02 002 ; port #2
0000 1111 0F 017 rrc ; Move accumulator right one bit
1101 0000 D0 320 rnc ; Return if no carry
1101 1011 DB 333 input ; get the char from port;
0000 0011 03 003 ; port #3
1011 1101 BD 275 cmp L ; Does char L = lead in string AE ?
1100 1000 C8 310 rz ; yes - loop back to get another char
0010 1101 2D 055 dcr L ; no - decrement the counter in L
0111 0111 77 167 mov M, A ; store the character in RAM @ HL
1100 0000 C0 300 rnz ; loop to get another until L = 0
1110 1001 E9 351 pchl ; jmp to start of program we just read.
0000 1011 0B 013 dw loop ; prime the stack with the
0000 0000 00 000 ; address of the top of the loop.
For the most part, I understand whats going on here, except for how does
the RNC & RZ know where to return to ? I'm assuming it jumps back to
lxi, sp. I also don't know why the stack is set to 032, 000.
Running this program yields no results and single stepping, it lets lost in
the weeds when it loops back and passes 1A.
I'm using Tera Term and can send data to and from the serial card
and display it on the PC, so I'm sure it's not a communication issue.
Another question is, where the flow control ? When I send a binary file
from Tera Term, it just dumps it out. Shouldn't it take it in one byte at a time
as the program loops checking for status bits & looking for the leader string AE ?
If there is a alternative way to load Altair 3.2 4k Basic, I'd like to know.
find a boot loader for Basic. There's a youtube video of an
Imsai loading basic, displaying incoming bits on the 'programmed
output' LED's that would be perfect for my needs, but no code is listed.
I've been googling and reading for days now and the only thing I have
found is loading Basic on an Altair.
http://www.solivant.com/
It looks like this is specific to certain Altair I/O boards the way it's
coded in the second stage, but I gave it a try anyway.
I changed to code to reflect my I/O ports and removed the code
to initialize the serial card as the SSM uses AY3-1015D.
Here's my code and comments as I understand it;
0010 0001 21 041 lxi H, 0FAEH ;Set stack to
1010 1110 AE 256 ;L = AE
0000 1111 0F 017 ;H = 0F
0011 0001 31 061 lxi SP, stack ;Set top of stack
0001 1010 1A 032
0000 0000 00 000
1101 1011 DB 333 input ; Check status bit from port;
0000 0010 02 002 ; port #2
0000 1111 0F 017 rrc ; Move accumulator right one bit
1101 0000 D0 320 rnc ; Return if no carry
1101 1011 DB 333 input ; get the char from port;
0000 0011 03 003 ; port #3
1011 1101 BD 275 cmp L ; Does char L = lead in string AE ?
1100 1000 C8 310 rz ; yes - loop back to get another char
0010 1101 2D 055 dcr L ; no - decrement the counter in L
0111 0111 77 167 mov M, A ; store the character in RAM @ HL
1100 0000 C0 300 rnz ; loop to get another until L = 0
1110 1001 E9 351 pchl ; jmp to start of program we just read.
0000 1011 0B 013 dw loop ; prime the stack with the
0000 0000 00 000 ; address of the top of the loop.
For the most part, I understand whats going on here, except for how does
the RNC & RZ know where to return to ? I'm assuming it jumps back to
lxi, sp. I also don't know why the stack is set to 032, 000.
Running this program yields no results and single stepping, it lets lost in
the weeds when it loops back and passes 1A.
I'm using Tera Term and can send data to and from the serial card
and display it on the PC, so I'm sure it's not a communication issue.
Another question is, where the flow control ? When I send a binary file
from Tera Term, it just dumps it out. Shouldn't it take it in one byte at a time
as the program loops checking for status bits & looking for the leader string AE ?
If there is a alternative way to load Altair 3.2 4k Basic, I'd like to know.