Allow one to specify the com port settings for boot0sio.
This commit is contained in:
parent
a587d2f78f
commit
b06cf654be
@ -23,13 +23,21 @@ BOOT_BOOT0_TICKS?= 0xb6
|
||||
# unless you are glutton for punishment.
|
||||
BOOT_BOOT0_ORG?= 0x600
|
||||
|
||||
# Comm settings for boot0sio. 0xE3 => 9600 8-N-1
|
||||
# XXX: We should create a build-tool or something to convert BOOT_CONSOLE_SPEED
|
||||
# and BOOT_COMCONSOLE_PORT into the correct values to define on the build
|
||||
# command line
|
||||
BOOT_BOOT0_COMCONSOLE_SPEED?= 0xE3
|
||||
|
||||
${PROG}: ${PROG}.o
|
||||
${LD} -N -e start -Ttext ${BOOT_BOOT0_ORG} -o ${PROG}.out ${PROG}.o
|
||||
objcopy -S -O binary ${PROG}.out ${.TARGET}
|
||||
|
||||
${PROG}.o: ${PROG}.s
|
||||
${AS} ${AFLAGS} --defsym FLAGS=${BOOT_BOOT0_FLAGS} \
|
||||
--defsym TICKS=${BOOT_BOOT0_TICKS} ${.IMPSRC} -o ${.TARGET}
|
||||
--defsym TICKS=${BOOT_BOOT0_TICKS} \
|
||||
--defsym COMSPEED=${BOOT_BOOT0_COMCONSOLE_SPEED} \
|
||||
${.IMPSRC} -o ${.TARGET}
|
||||
|
||||
CLEANFILES+= ${PROG}.out ${PROG}.o
|
||||
|
||||
|
@ -95,8 +95,7 @@ start: cld # String ops inc
|
||||
#
|
||||
main: pushw %dx # Save
|
||||
xorw %dx,%dx # Port: COM1
|
||||
movb $0xE3,%al # 9600 8-N-1
|
||||
|
||||
movb COMSPEED,%al # defined by Makefile
|
||||
movb $0x00,%ah # BIOS: Set COM Port
|
||||
int $0x14 # Parameters
|
||||
popw %dx # Restore
|
||||
|
@ -95,8 +95,7 @@ start: cld # String ops inc
|
||||
#
|
||||
main: pushw %dx # Save
|
||||
xorw %dx,%dx # Port: COM1
|
||||
movb $0xE3,%al # 9600 8-N-1
|
||||
|
||||
movb COMSPEED,%al # defined by Makefile
|
||||
movb $0x00,%ah # BIOS: Set COM Port
|
||||
int $0x14 # Parameters
|
||||
popw %dx # Restore
|
||||
|
Loading…
Reference in New Issue
Block a user