It's working \o/
Now starts doing stuff in the loader when bootstrapping the .prg from ARAnyM. For now it just dumps the cookies. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23552 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -18,8 +18,13 @@ UsePrivateHeaders [ FDirName storage ] ;
|
|||||||
|
|
||||||
#SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
#SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
||||||
|
|
||||||
KernelMergeObject boot_platform_atari_m68k.o :
|
KernelMergeObject boot_platform_atari_m68k_shell.o :
|
||||||
shell.S
|
shell.S
|
||||||
|
: -Wa,--pcrel
|
||||||
|
;
|
||||||
|
|
||||||
|
KernelMergeObject boot_platform_atari_m68k_other.o :
|
||||||
|
# shell.S
|
||||||
start.c
|
start.c
|
||||||
toscalls.S
|
toscalls.S
|
||||||
debug.c
|
debug.c
|
||||||
@@ -45,7 +50,13 @@ KernelMergeObject boot_platform_atari_m68k.o :
|
|||||||
#decode_edid.c
|
#decode_edid.c
|
||||||
#dump_edid.c
|
#dump_edid.c
|
||||||
|
|
||||||
: -fpic -Wa,--pcrel
|
: -fno-pic #-Wa,--pcrel
|
||||||
|
;
|
||||||
|
|
||||||
|
KernelMergeObject boot_platform_atari_m68k.o :
|
||||||
|
: :
|
||||||
|
boot_platform_atari_m68k_shell.o
|
||||||
|
boot_platform_atari_m68k_other.o
|
||||||
;
|
;
|
||||||
|
|
||||||
SEARCH on [ FGristFiles text_menu.cpp ]
|
SEARCH on [ FGristFiles text_menu.cpp ]
|
||||||
|
|||||||
@@ -31,17 +31,20 @@
|
|||||||
|
|
||||||
#warning M68K: add set_vbr()
|
#warning M68K: add set_vbr()
|
||||||
|
|
||||||
|
|
||||||
static status_t
|
static status_t
|
||||||
check_cpu_features()
|
check_cpu_features()
|
||||||
{
|
{
|
||||||
#warning M68K: TODO: probe ourselves, we shouldn't trust the TOS!
|
#warning M68K: TODO: probe ourselves, we shouldn't trust the TOS!
|
||||||
|
|
||||||
const tos_cookie *c;
|
const tos_cookie *c;
|
||||||
|
|
||||||
c = tos_find_cookie('_CPU');
|
c = tos_find_cookie('_CPU');
|
||||||
if (!c) {
|
if (!c) {
|
||||||
panic("can't get a cookie (_CPU)! Mum, I'm hungry!");
|
panic("can't get a cookie (_CPU)! Mum, I'm hungry!");
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
}
|
}
|
||||||
|
dump_tos_cookies();
|
||||||
|
|
||||||
#warning M68K: check for 020 + mmu
|
#warning M68K: check for 020 + mmu
|
||||||
if (c->ivalue < 30/*20*/)
|
if (c->ivalue < 30/*20*/)
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ panic(const char *format, ...)
|
|||||||
|
|
||||||
//platform_switch_to_text_mode();
|
//platform_switch_to_text_mode();
|
||||||
|
|
||||||
Bconputs(DEV_CONSOLE, "*** PANIC ***");
|
Bconputs(DEV_CONSOLE, "\n*** PANIC ***");
|
||||||
|
|
||||||
va_start(list, format);
|
va_start(list, format);
|
||||||
length = vsnprintf(buffer, sizeof(buffer), format, list);
|
length = vsnprintf(buffer, sizeof(buffer), format, list);
|
||||||
@@ -51,10 +51,10 @@ dprintf(const char *format, ...)
|
|||||||
length = vsnprintf(buffer, sizeof(buffer), format, list);
|
length = vsnprintf(buffer, sizeof(buffer), format, list);
|
||||||
va_end(list);
|
va_end(list);
|
||||||
|
|
||||||
Bconputs(DEV_AUX, buffer);
|
Bconput(DEV_AUX, buffer);
|
||||||
|
|
||||||
if (platform_boot_options() & BOOT_OPTION_DEBUG_OUTPUT)
|
//if (platform_boot_options() & BOOT_OPTION_DEBUG_OUTPUT)
|
||||||
Bconputs(DEV_CONSOLE, buffer);
|
Bconput(DEV_CONSOLE, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -145,3 +145,26 @@ status_t toserror(int32 err)
|
|||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void dump_tos_cookie(uint32 cookie)
|
||||||
|
{
|
||||||
|
const tos_cookie *c;
|
||||||
|
c = tos_find_cookie(cookie);
|
||||||
|
if (!c)
|
||||||
|
dprintf("%4.4s: nil\n", &cookie);
|
||||||
|
else
|
||||||
|
dprintf("%4.4s: 0x%08lx, %d\n", &cookie, c->ivalue, c->ivalue);
|
||||||
|
}
|
||||||
|
void dump_tos_cookies(void)
|
||||||
|
{
|
||||||
|
static const uint32 clist[] = { '_CPU', '_FPU', '_VDO', '_FDC',
|
||||||
|
'_SND', '_MCH', '_SWI', '_FRB',
|
||||||
|
'_FLK', '_NET', '_IDT', '_AKP',
|
||||||
|
'FSMC', 'SAM\0', 'MiNT', NULL };
|
||||||
|
int i;
|
||||||
|
dprintf("Cookies:\n");
|
||||||
|
for (i = 0; clist[i]; i++)
|
||||||
|
dump_tos_cookie(clist[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ SECTIONS
|
|||||||
/*. = 0x80000000 + SIZEOF_HEADERS;*/
|
/*. = 0x80000000 + SIZEOF_HEADERS;*/
|
||||||
/* fool the alignment of .text */
|
/* fool the alignment of .text */
|
||||||
/*. = 0x20 - 0x1c;*/
|
/*. = 0x20 - 0x1c;*/
|
||||||
|
/* should stay in sync with boot_loader_m68k_atari.ld and atari_memory_map.h */
|
||||||
|
. = 0x00080000 - 0x1c ;
|
||||||
|
|
||||||
/* .PRG file header */
|
/* .PRG file header */
|
||||||
.prgheader : {
|
.prgheader : {
|
||||||
@@ -24,37 +26,44 @@ SECTIONS
|
|||||||
LONG(0) /* SYMBOL TABLE SIZE */
|
LONG(0) /* SYMBOL TABLE SIZE */
|
||||||
LONG(0x4841494b) /* (reserved) 'HAIK' */
|
LONG(0x4841494b) /* (reserved) 'HAIK' */
|
||||||
LONG(0x1) /* PRGFLAGS : PF_FASTLOAD */
|
LONG(0x1) /* PRGFLAGS : PF_FASTLOAD */
|
||||||
SHORT(0) /* ABSFLAG */
|
SHORT(1) /* ABSFLAG */
|
||||||
}
|
}
|
||||||
|
|
||||||
__text_start = .;
|
__text_start = .;
|
||||||
/* ".text ." should align to 0x1c but doesn't work as expected, cf top. */
|
/* ".text ." should align to 0x1c but doesn't work as expected, cf top. */
|
||||||
.text . : {
|
.text : {
|
||||||
*(.text .gnu.linkonce.t.*)
|
*(.text .gnu.linkonce.t.*)
|
||||||
*(.rel.text) *(.rel.gnu.linkonce.t*)
|
/* *(.rel.text) *(.rel.gnu.linkonce.t*)
|
||||||
*(.rela.text) *(.rela.gnu.linkonce.t*)
|
*(.rela.text) *(.rela.gnu.linkonce.t*) */
|
||||||
|
}
|
||||||
|
. = ALIGN(0x4);
|
||||||
|
__ctor_list = .;
|
||||||
|
.ctors : { *(.ctors) }
|
||||||
|
__ctor_end = .;
|
||||||
|
|
||||||
|
.rodata : {
|
||||||
*(.rodata)
|
*(.rodata)
|
||||||
*(.rel.rodata) *(.rel.gnu.linkonce.r*)
|
/* *(.rel.rodata) *(.rel.gnu.linkonce.r*)
|
||||||
*(.rela.rodata) *(.rela.gnu.linkonce.r*)
|
*(.rela.rodata) *(.rela.gnu.linkonce.r*) */
|
||||||
}
|
}
|
||||||
/* writable data */
|
/* writable data */
|
||||||
/* NO! . = ALIGN(0x1000); */
|
/* NO! . = ALIGN(0x1000); */
|
||||||
|
. = ALIGN(0x1000);
|
||||||
__data_start = .;
|
__data_start = .;
|
||||||
.data : {
|
.data : {
|
||||||
*(.data .gnu.linkonce.d.*)
|
*(.data .gnu.linkonce.d.*)
|
||||||
*(.rel.data) *(.rel.gnu.linkonce.d*)
|
/* *(.rel.data) *(.rel.gnu.linkonce.d*)
|
||||||
*(.rela.data) *(.rela.gnu.linkonce.d*)
|
*(.rela.data) *(.rela.gnu.linkonce.d*) */
|
||||||
}
|
}
|
||||||
/* unintialized data (in same segment as writable data) */
|
/* unintialized data (in same segment as writable data) */
|
||||||
__bss_start = .;
|
__bss_start = .;
|
||||||
.bss : {
|
.bss : {
|
||||||
*(.bss)
|
*(.bss)
|
||||||
*(.rel.bss)
|
/* *(.rel.bss)
|
||||||
*(.rela.bss)
|
*(.rela.bss) */
|
||||||
}
|
}
|
||||||
/* . = ALIGN(0x1000); */
|
. = ALIGN(0x1000);
|
||||||
_end = . ;
|
_end = . ;
|
||||||
|
|
||||||
.prgtrailer : {
|
.prgtrailer : {
|
||||||
LONG(0) /* FIXUP OFFSET */
|
LONG(0) /* FIXUP OFFSET */
|
||||||
LONG(0)
|
LONG(0)
|
||||||
@@ -62,3 +71,4 @@ SECTIONS
|
|||||||
/* Strip unnecessary stuff */
|
/* Strip unnecessary stuff */
|
||||||
/DISCARD/ : { *(.comment .note .eh_frame) }
|
/DISCARD/ : { *(.comment .note .eh_frame) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,9 +44,8 @@
|
|||||||
//.text
|
//.text
|
||||||
_bs_entry:
|
_bs_entry:
|
||||||
/* main entry point, both from the floppy boot and .prg */
|
/* main entry point, both from the floppy boot and .prg */
|
||||||
//bra.s skip_fat_skim
|
|
||||||
bra.s real_entry
|
bra.s real_entry
|
||||||
//bra.s _bs_entry
|
|
||||||
//FAT lookalike to avoid nasty things from happening
|
//FAT lookalike to avoid nasty things from happening
|
||||||
// http://alive.atari.org/alive10/btmania.php
|
// http://alive.atari.org/alive10/btmania.php
|
||||||
.ascii "Haiku0"
|
.ascii "Haiku0"
|
||||||
@@ -58,7 +57,7 @@ _bs_entry:
|
|||||||
.byte 0x00, 0x02 //RES - number of reserved sectors
|
.byte 0x00, 0x02 //RES - number of reserved sectors
|
||||||
.byte 0x00//0x02 //NFATS
|
.byte 0x00//0x02 //NFATS
|
||||||
.byte 0x00/*70*/, 0x00 //NDIRS
|
.byte 0x00/*70*/, 0x00 //NDIRS
|
||||||
.byte 0x00, 0x02 //NSECTS
|
.byte 0xa0, 0x05 //NSECTS
|
||||||
.byte 0xf8 //MEDIA
|
.byte 0xf8 //MEDIA
|
||||||
.byte 0x05, 0x00 //SPF
|
.byte 0x05, 0x00 //SPF
|
||||||
.byte 0x09, 0x00 //SPT
|
.byte 0x09, 0x00 //SPT
|
||||||
@@ -66,46 +65,38 @@ _bs_entry:
|
|||||||
.byte 0x00, 0x00 //NHID
|
.byte 0x00, 0x00 //NHID
|
||||||
// we're done
|
// we're done
|
||||||
|
|
||||||
skip_fat_skim:
|
|
||||||
// lea str,%a0
|
|
||||||
// bsr puts
|
|
||||||
// bra skip_fat_skim
|
|
||||||
//rts
|
|
||||||
// bra real_entry
|
|
||||||
|
|
||||||
sNumSectors:
|
sNumSectors:
|
||||||
// this location will contain the length of the boot loader as
|
// this location will contain the length of the boot loader as
|
||||||
// written by the "makeflop" command in 512 byte blocks
|
// written by the "makeflop" command in 512 byte blocks
|
||||||
// 0x180 is the allowed maximum, as the zipped TAR with the
|
// 0x180 is the allowed maximum, as the zipped TAR with the
|
||||||
// kernel and the boot module might start at offset 192 kB
|
// kernel and the boot module might start at offset 192 kB
|
||||||
.word 0x0180
|
.word 0x0300 //0x0180
|
||||||
|
|
||||||
real_entry:
|
real_entry:
|
||||||
|
|
||||||
|
#if 0
|
||||||
lea h1,%a0
|
lea h1,%a0
|
||||||
bsr puts
|
bsr puts
|
||||||
move.l #0x1234aa55,%d0
|
move.l #0x1234aa55,%d0
|
||||||
bsr putx
|
bsr putx
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if 0
|
||||||
//_membot
|
//_membot
|
||||||
move.l #0x432,%a0
|
//move.l #0x432,%a0
|
||||||
move.l (%a0),%d0
|
//move.l (%a0),%d0
|
||||||
bsr putx
|
//bsr putx
|
||||||
|
|
||||||
//_memtop
|
//_memtop
|
||||||
move.l #0x436,%a0
|
//move.l #0x436,%a0
|
||||||
move.l (%a0),%d0
|
//move.l (%a0),%d0
|
||||||
bsr putx
|
//bsr putx
|
||||||
|
|
||||||
//_v_bas_ad
|
//_v_bas_ad
|
||||||
move.l #0x44e,%a0
|
move.l #0x44e,%a0
|
||||||
move.l (%a0),%d0
|
move.l (%a0),%d0
|
||||||
bsr putx
|
bsr putx
|
||||||
|
#endif
|
||||||
|
|
||||||
//Pterm0
|
|
||||||
//move.w #0,-(%sp)
|
|
||||||
//trap #1
|
|
||||||
|
|
||||||
// first, determine if .prg (user) or bootsect (super)
|
// first, determine if .prg (user) or bootsect (super)
|
||||||
// Super()
|
// Super()
|
||||||
@@ -123,7 +114,11 @@ real_entry:
|
|||||||
|
|
||||||
bra prg_start
|
bra prg_start
|
||||||
//bra bootsect_start
|
//bra bootsect_start
|
||||||
rts
|
|
||||||
|
/*
|
||||||
|
* floppy boot support code
|
||||||
|
*/
|
||||||
|
|
||||||
floppy_start:
|
floppy_start:
|
||||||
lea h3,%a0
|
lea h3,%a0
|
||||||
bsr puts
|
bsr puts
|
||||||
@@ -136,9 +131,11 @@ floppy_start:
|
|||||||
// load the rest
|
// load the rest
|
||||||
move.w sNumSectors,%d2
|
move.w sNumSectors,%d2
|
||||||
// load at base + this code.
|
// load at base + this code.
|
||||||
move.l #ATARI_ZBEOS_BASE+512,%a2
|
move.l #(ATARI_ZBEOS_BASE+512),%a2
|
||||||
|
//move.l %a2,%d0
|
||||||
|
//bsr putx
|
||||||
bsr load_sectors
|
bsr load_sectors
|
||||||
tst.l %d0
|
tst.w %d0
|
||||||
beq floppy_done
|
beq floppy_done
|
||||||
lea failure_string,%a0
|
lea failure_string,%a0
|
||||||
bsr puts
|
bsr puts
|
||||||
@@ -150,6 +147,7 @@ floppy_done:
|
|||||||
move.l #ATARI_ZBEOS_STACK_BASE,%sp
|
move.l #ATARI_ZBEOS_STACK_BASE,%sp
|
||||||
lea h5,%a0
|
lea h5,%a0
|
||||||
bsr puts
|
bsr puts
|
||||||
|
move.l #0,%d0
|
||||||
//jmp ATARI_ZBEOS_BASE+512
|
//jmp ATARI_ZBEOS_BASE+512
|
||||||
jmp _start
|
jmp _start
|
||||||
|
|
||||||
@@ -161,15 +159,40 @@ floppy_done:
|
|||||||
|
|
||||||
load_sectors:
|
load_sectors:
|
||||||
|
|
||||||
|
#if 1
|
||||||
|
/* it seems to skip 9 every 9 sectors, buggy side handling ? */
|
||||||
// Rwabs
|
// Rwabs
|
||||||
|
//move.l #1,-(%sp)
|
||||||
move.w #0,-(%sp) // A:
|
move.w #0,-(%sp) // A:
|
||||||
|
//move.w #2,-(%sp) // C:
|
||||||
|
//move.w #-1,-(%sp) // 2nd sector
|
||||||
move.w #1,-(%sp) // 2nd sector
|
move.w #1,-(%sp) // 2nd sector
|
||||||
move.w %d2,-(%sp)
|
move.w %d2,-(%sp)
|
||||||
move.l %a2,-(%sp)
|
move.l %a2,-(%sp)
|
||||||
move.w #RW_READ+RW_NOTRANSLATE,-(%sp)
|
//move.w #RW_READ+RW_NOTRANSLATE,-(%sp)
|
||||||
|
move.w #RW_READ+RW_NOMEDIACH,-(%sp)
|
||||||
move.w #4,-(%sp)
|
move.w #4,-(%sp)
|
||||||
trap #13
|
trap #13
|
||||||
add.l #14,%sp
|
add.l #14,%sp
|
||||||
|
#endif
|
||||||
|
#if 0
|
||||||
|
// d2:
|
||||||
|
|
||||||
|
//move.w %d2,-(%sp)
|
||||||
|
move.w #9,-(%sp)
|
||||||
|
move.w #0,-(%sp)
|
||||||
|
move.w #0,-(%sp)
|
||||||
|
move.w #1,-(%sp)
|
||||||
|
move.w #0,-(%sp)
|
||||||
|
move.l #0,-(%sp)
|
||||||
|
//move.w #0,-(%sp)
|
||||||
|
//move.l %a2,-(%sp)
|
||||||
|
move.l #ATARI_ZBEOS_BASE,-(%sp)
|
||||||
|
move.w #8,-(%sp) // floprd
|
||||||
|
trap #XBIOS_TRAP
|
||||||
|
add.l #20,%sp
|
||||||
|
#endif
|
||||||
|
|
||||||
bsr putx
|
bsr putx
|
||||||
rts
|
rts
|
||||||
|
|
||||||
@@ -181,18 +204,14 @@ failure_string:
|
|||||||
// .org DOT_STRING
|
// .org DOT_STRING
|
||||||
.string "."
|
.string "."
|
||||||
|
|
||||||
//shell_end:
|
/*
|
||||||
// .skip 0x01fe - tmp_floppy_end
|
* \AUTO\HAIKU.PRG and ARAnyM BOOTSTRAP() support code
|
||||||
//// .org 0x01fe
|
*/
|
||||||
// .word 0xaa55
|
|
||||||
// this bumps the "start" label to offset 0x0200 as
|
|
||||||
// expected by the BFS boot loader, and also marks
|
|
||||||
// this block as valid boot block for the BIOS
|
|
||||||
|
|
||||||
prg_start:
|
prg_start:
|
||||||
lea h4,%a0
|
//lea h4,%a0
|
||||||
bsr puts
|
//bsr puts
|
||||||
#if 0
|
|
||||||
// .prg:
|
// .prg:
|
||||||
// we need to switch to supervisor mode anyway
|
// we need to switch to supervisor mode anyway
|
||||||
move.l #SUP_SET,-(%sp)
|
move.l #SUP_SET,-(%sp)
|
||||||
@@ -201,11 +220,11 @@ prg_start:
|
|||||||
addq.l #6,%sp
|
addq.l #6,%sp
|
||||||
move.l %d0,saved_super_stack
|
move.l %d0,saved_super_stack
|
||||||
|
|
||||||
|
// disable interrupts
|
||||||
|
or.w #0x0700,%sr
|
||||||
|
|
||||||
lea h5,%a0
|
lea h5,%a0
|
||||||
bsr puts
|
bsr puts
|
||||||
//Pterm0
|
|
||||||
move.w #0,-(%sp)
|
|
||||||
trap #1
|
|
||||||
|
|
||||||
// copy the rest of the prg
|
// copy the rest of the prg
|
||||||
move.l sNumSectors,%d0
|
move.l sNumSectors,%d0
|
||||||
@@ -219,18 +238,16 @@ copysect_loop:
|
|||||||
move.l (%a0)+,(%a1)+
|
move.l (%a0)+,(%a1)+
|
||||||
dbf %d1,copysect_loop
|
dbf %d1,copysect_loop
|
||||||
dbf %d0,nextsect
|
dbf %d0,nextsect
|
||||||
#endif
|
|
||||||
|
|
||||||
lea str,%a0
|
lea msg_j1,%a0
|
||||||
bsr puts
|
bsr puts
|
||||||
// all done
|
// all done
|
||||||
spin:
|
spin:
|
||||||
lea unimpl,%a0
|
//bra spin
|
||||||
bsr puts
|
|
||||||
bra spin
|
|
||||||
|
|
||||||
super_done:
|
super_done:
|
||||||
// XXX: copy the rest !
|
// XXX: copy the rest !
|
||||||
|
move.l #0,%d0
|
||||||
//jmp ATARI_ZBEOS_BASE+512
|
//jmp ATARI_ZBEOS_BASE+512
|
||||||
jmp _start
|
jmp _start
|
||||||
|
|
||||||
@@ -322,6 +339,8 @@ h5:
|
|||||||
.string "H5"
|
.string "H5"
|
||||||
unimpl:
|
unimpl:
|
||||||
.string "Unimplemented."
|
.string "Unimplemented."
|
||||||
|
msg_j1:
|
||||||
|
.string "jumping to zbeos."
|
||||||
|
|
||||||
|
|
||||||
shell_end:
|
shell_end:
|
||||||
|
|||||||
@@ -108,11 +108,6 @@ void
|
|||||||
_start(void)
|
_start(void)
|
||||||
{
|
{
|
||||||
stage2_args args;
|
stage2_args args;
|
||||||
Bconout(DEV_CON, 'h');
|
|
||||||
Bconout(DEV_CON, 'A');
|
|
||||||
Bconout(DEV_CON, 'I');
|
|
||||||
Bconout(DEV_CON, 'K');
|
|
||||||
Bconout(DEV_CON, 'U');
|
|
||||||
|
|
||||||
|
|
||||||
//asm("cld"); // Ain't nothing but a GCC thang.
|
//asm("cld"); // Ain't nothing but a GCC thang.
|
||||||
@@ -127,7 +122,7 @@ _start(void)
|
|||||||
//serial_init();
|
//serial_init();
|
||||||
console_init();
|
console_init();
|
||||||
cpu_init();
|
cpu_init();
|
||||||
mmu_init();
|
//mmu_init();
|
||||||
|
|
||||||
// wait a bit to give the user the opportunity to press a key
|
// wait a bit to give the user the opportunity to press a key
|
||||||
spin(750000);
|
spin(750000);
|
||||||
|
|||||||
@@ -209,17 +209,25 @@ struct tosbpb {
|
|||||||
#define Kbshift(mode) toscallW(BIOS_TRAP, 11, (uint16)mode)
|
#define Kbshift(mode) toscallW(BIOS_TRAP, 11, (uint16)mode)
|
||||||
|
|
||||||
/* handy shortcut */
|
/* handy shortcut */
|
||||||
static inline int Bconputs(int16 handle, const char *string)
|
static inline int Bconput(int16 handle, const char *string)
|
||||||
{
|
{
|
||||||
int i, err;
|
int i, err;
|
||||||
for (i = 0; string[i]; i++) {
|
for (i = 0; string[i]; i++) {
|
||||||
|
if (string[i] == '\n')
|
||||||
|
Bconout(handle, '\r');
|
||||||
err = Bconout(handle, string[i]);
|
err = Bconout(handle, string[i]);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int Bconputs(int16 handle, const char *string)
|
||||||
|
{
|
||||||
|
int err = Bconput(handle, string);
|
||||||
Bconout(handle, '\r');
|
Bconout(handle, '\r');
|
||||||
Bconout(handle, '\n');
|
Bconout(handle, '\n');
|
||||||
return i;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* __ASSEMBLER__ */
|
#endif /* __ASSEMBLER__ */
|
||||||
@@ -310,6 +318,7 @@ static inline int Bconputs(int16 handle, const char *string)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
extern status_t toserror(int32 err);
|
extern status_t toserror(int32 err);
|
||||||
|
extern void dump_tos_cookies(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Cookie Jar access
|
* Cookie Jar access
|
||||||
|
|||||||
Reference in New Issue
Block a user