home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.sys.apple2      Discussion about Apple II micros      56,720 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 55,187 of 56,720   
   Steve Nickolas to qkumba   
   Re: ProDOS boot block?   
   28 Dec 21 00:06:50   
   
   From: usotsuki@buric.co   
      
   On Mon, 27 Dec 2021, qkumba wrote:   
      
   >> For the Apple II part, the first byte needs to be $01   
   >   
   > It can be zero.  The PROM loops while the value in $3D is < $800.   
   > Then to make 6502/8086 compatible, the sequence can be   
   > 00 CD EB xx   
   >   
   > which on 8086 is   
   > 00 CD ADD CH,CL   
   > EB xx JMP SHORT [to x86-specific code]   
   > and on 6502   
   > 00 ;1 sector read   
   > CD EB xx CMP $xxEB   
   > [6502 continues]   
   >   
   Hm. So if I can plug in some x86 code that moves code out of the way to   
   load the second block in place of the first at 0000:7C00, i.e.,   
      
   retry:    mov       ax, 0x0201          ; read (AH) 1 (AL) sector   
              mov       cx, 0x0002          ; track 0 sector 2   
              mov       dh, 0x00            ; head 0 (DL unchanged from entry)   
              xor       bx, bx   
              mov       es, bx              ; ES=$0000   
              mov       bx, 0x7C00   
              int       0x13   
              jc        retry   
              jmp       0x0000:0x7C00   
      
   (just banged out in a hurry)   
      
   it might be possible to make a diglot 6502-8086 bootloader.  But I'd have   
   to strip out the /// stuff to have enough free space for that.  And it   
   would probably require some better 8086 code than what I just wrote.  But   
   it's a start.   
      
   -uso.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca