@piotr_go, post #1
@juen, post #2
@asman, post #10
move.l $4.w,a6 ; not really required as a6 = execbase at boot :)
move.l #LOADADDRESS,$28(a1)
move.l #LENGTH,$24(a1)
move.l #OFFSET,$2c(a1)
jsr -456(a6)
@asman, post #12
; ---- ---- Boot Block, struct from: include/devices/bootblock.h ----- dc.b 'DOS',0 ; bb_id = BBID_DOS dc.l 0 ; bb_chksum dc.l 880 ; bb_dosblock = 880, DOS block on track 40 ; ---- ---- minimal BootBlock code (8-bytes), loads next 2 sectors in the same place addq.b #2, $002E(a1) ; WW ; IORequest.io_Offset $0400, just after Boot Block jsr exec_DoIO(a6) ; WW ; EXEC.library DoIO(a1 = struct IORequest *)
@makarsky, post #13
; ---- writes text TEXT_run: lea gfx_libname(pc),a1 ; name jsr exec_OldOpenLibrary(a6) move.l d0,a6 ; graphics.library base to A6 lea TEXT_rastport-CURT_copper(a4),a1; RastPort ptr jsr gfx_InitRastPort(a6) lea TEXT_bitmap-CURT_copper(a4),a0 ; BitMap ptr moveq #1,d0 ; depth move.l #640,d1 ; width move.l #50,d2 ; height = 5 lines of text with line spacing jsr gfx_InitBitMap(a6) move.l a0,4(a1) ; RastPort.Bitmap pointer lea TEXT_bitplane-CURT_copper(a4),a2; Bitplane ptr move.l a2,8(a0) moveq #4,d7 ; no of text lines -1 move.w #6,d1 ; y=6, minimal y pos due to font baseline lea BB_text(pc),a0 ; string ptr ; lea TEXT_rastport-CURT_copper(a4),a1 TEXT_loop: movem.l d0-a6,-(a7) ; due to gfx_Text regs overwritting moveq #0,d0 ; x jsr gfx_Move(a6) moveq #62,d0 ; string len jsr gfx_Text(a6) movem.l (a7)+,d0-a6 lea 64(a0),a0 ; ptr to next line of text add.w #10,d1 ; dy dbf d7,TEXT_loop
@makarsky, post #13
dc.b "DOS",0 ;DOS disk identifier dc.l 0 ;room for bootblock chksum dc.l $880 ;room for rootblock pointer add.l #$400,$28(a1) move.l #$1200,$24(a1) move.l #$400,$2c(a1) jsr -456(a6) loop1: bra loop1
@piotr_go, post #15
@asman, post #16
@asman, post #16
Oczywiście można poprosić exec.library o przydzielenie bloku pamięci (AllocMem) ale to wszystko swoje bajty kosztuje.
@piotr_go, post #17
Adres jest poprawny, odczytanie danych z pod niego daje "DOS,0....."
@piotr_go, post #15
@makarsky, post #22