Basically, what a dot test is, or what I've done when I write code and can't figure out wtf is wrong, I'll go in and slap code everywhere I think there could be a problem that basically drops a dot on the screen. in loops with various exit functions, I'll put a character - it's sort of a character dot test, based on the output I can tell what the code is doing, that and by counting the dots.
I can see where it gets, and such.
lemme go run it.

dottest failed. the code shows that it's not reading anything, it's looping back through itself again and again (when trying to read the rom id)
when I selected the serial port (versus the parallel, which is hooked up) the program called .idloop, walked through, then called .expectff (it gave me a dot, then an F on the screen. .F.F.F.F.F.F)
here, i know a little more:
Code: Select all
in xmitpoll:
.stopbit:
> push ax
> xor ah, ah
> mov al, 'A'
> call putchar
> pop ax
mov al,1
mov byte [cs:.parity],0
in recvpoll:
.paritybit:
cmp byte [cs:.parity],cl ; check the parity bit
jne .parerr
xor bh,bh
mov bl,[cs:in_end]
mov al,byte [cs:.buf]
mov byte [cs:in_buf+bx],al ; store the new byte in the fifo
> push ax
> xor ah, ah
> mov al,'B'
> call putchar
> pop ax
inc bl
AAAAAAAAAABABABAAAAAAAAAAABABABAAAAAAAAAAABABABA
Ten A's, followed by BABABA (complete recieve, complete send, repeat)
We're getting data, the question is - is this just idle noise on the line, or is the ECU responding?
It's kind of slow to be responding (to recieve those recieves so late)
edit again
timing is right, the software isn't picking up on the sends from the ECU, or something else is wrong - I suspect this is also happening to everyone else who is using this revision of the program.
the B's amongst all those A's were FF, FE, and E7 in that order. I did a puthex call right after recieving the byte
Code: Select all
call byteready
jz .done
call readbyte ; expect ff,fe,??,romid
call puthex
or dl,dl
Vikash, your turn.
edit again: 11:08PM
Code: Select all
<Whimsy> scuzzy: You try 0xff?
<Whimsy> That's how I always did hex numbers in nasm.
<scuzzy> ohhhh
<scuzzy> damnit
<scuzzy> why did you say that right before I went to bed
this is what it looks like that I'll try in the morning, incase anyone is interested:
Code: Select all
getid ; try to get rom id; al=0 on failure
pusha
call clrscr
mov word [cs:cursor_loc],40*2
mov bx,word [cs:portstr]
call putstring
mov ax,word [cs:baseport]
call puthexword
mov al,'.'
call putchar
mov word [cs:cursor_loc],80*2
mov bx,.readstr
call putstring
xor bh,bh ; offset in commands
xor dl,dl ; how many bytes we've read
.idloop:
push ax
mov al,'.'
xor ah, ah
call putchar
pop ax
mov al,byte [cs:.commands+bx] ; send the next byte
call sendbyte
inc bl
and bl,7 ; keep walking through commands
call byteready
jz .done
call readbyte ; expect ff,fe,??,romid
call puthex
or dl,dl
jz .expectff
cmp dl,1
je .expectfe
cmp dl,2
je .expectany
cmp dl,3
je .expectromid1
cmp dl,4
je .expectromid2
mov byte [cs:romid+2],al ; last byte of rom id
jmp .gotid
.expectff:
push ax
xor ax, ax
mov al, 'F'
call putchar
pop ax
cmp al,0xff
jne .notff
mov dl,1
jmp .done
.notff:
push ax
xor ax, ax
mov al, 'X'
call putchar
pop ax
xor dl,dl
jmp .done
.expectfe:
push ax
xor ax, ax
mov al, 'E'
call putchar
pop ax
cmp al,0xfe
jne .expectff
inc dl
jmp .done
.expectany:
push ax
xor ax, ax
mov al, '?'
call putchar
pop ax
inc dl
jmp .done
.expectromid1:
cmp al,0xff
je .expectff
mov byte [cs:romid],al
inc dl
jmp .done
.expectromid2:
mov byte [cs:romid+1],al
inc dl
.done:
in al,64h
test al,1 ; check if there's a scancode ready
jz .idloop
in al,60h ; read the scancode
cmp al,81h ; and see if it's escape-up
jne .idloop
popa
xor al,al
ret
.gotid:
push ax
xor ax, ax
mov al, 'G'
call putchar
pop ax
mov al,12h ; send a 'reset' message
call sendbyte
xor al,al
call sendbyte
call sendbyte
call sendbyte
popa
mov al,1
ret
.commands:
db 78h,0ffh,0feh,00h ; read 0fffeh
db 00h,0ffh,0ffh,00h ; request rom id
.readstr db 'Reading ROM ID...',0