pushed updates

This commit is contained in:
Dennis Gunia
2024-06-24 09:21:16 +02:00
parent 488efa3907
commit d18e8e9e69
197 changed files with 316846 additions and 223785 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
../../monitor_v2/zout/symbols.s

View File

@@ -0,0 +1,5 @@
export OPT_GEN_SYMBOLTABLE=0
export OPT_GEN_MONFILE=1
export OPT_GEN_OBJFILE=1
export OPT_WRITEROM=0
export FILENAME=test

View File

@@ -0,0 +1,135 @@
.include "extern_symbols.s" ;include monitor symbols.
START_ADDR .EQU 0x8000
org START_ADDR
com_header:
jp com_prg
db 0x00
dw 0x00, 0x00, 0x00 ;always 0
dw [START_ADDR] ;start addr
dw [_eof] ;end of file
dw [_eof - START_ADDR] ;length
dc 48,0x00
com_prg:
ld hl,[var_input] ;find end of command name
ld bc,80
ld a,' '
cpir
ld bc,80
ld a,' '
cpir
push hl
pop hl
;HL now has pointer to file name
ex de,hl
call fat_openfile ;find file
or a
jp nz, _com_prg_fail ;if not found, exit
;prepare 32bit counter
xor a
ld (var_scratch), a
ld (var_scratch+1), a
ld (var_scratch+2), a
ld (var_scratch+3), a
;printloop
_com_prg_loop: ;main loop, load sector
ld de,[MEM_IDE_BUFFER]
call fat_readfilesec ;read sector
push af
ld hl, [_com_prg_fail_str_header]
call print_str ;print header
ld hl, [MEM_IDE_BUFFER]
ld de, 512 ; set sector byte counter
ld (var_scratch+4),de
_com_prg_loop_row:
call print_newLine
ld a, (var_scratch+3) ;print offset
call print_a_hex
ld a, (var_scratch+2)
call print_a_hex
ld a, (var_scratch+1)
call print_a_hex
ld a, (var_scratch)
call print_a_hex
ld a, ' '
call print_char
ld a, '|'
call print_char
ld a, ' '
call print_char
ld a,(var_scratch) ;increment total byte counter
add 16
ld (var_scratch),a
ld a,(var_scratch+1) ; byte 1
adc 0
ld (var_scratch+1),a
ld a,(var_scratch+2) ; byte 2
adc 0
ld (var_scratch+2),a
ld a,(var_scratch+3) ; byte 3
adc 0
ld (var_scratch+3),a
;now start printing data (512 bytes)
ld b, 16 ; bytes per column
push hl
_com_prg_loop_column:
ld a, (hl) ;print value
call print_a_hex
ld a, ' ' ;print seperator
call print_char
inc hl ;increment current byte pointer
ld de,(var_scratch+4) ;decrement sector byte counter
dec de
ld (var_scratch+4),de
djnz _com_prg_loop_column ;loop 16 times
ld a, '|'
call print_char
ld a, ' '
call print_char
pop hl
ld b, 16 ; bytes per column
_com_prg_loop_column_ascii:
ld a, (hl)
inc hl
cp 32
jp c, _com_prg_loop_column_ascii_none ;if less than 32, it is not a char
cp 127
jp nc, _com_prg_loop_column_ascii_none ;if greater or equal than 128, it is not a char
call print_char
jr _com_prg_loop_column_ascii_le
_com_prg_loop_column_ascii_none:
ld a,'.'
call print_char
_com_prg_loop_column_ascii_le:
djnz _com_prg_loop_column_ascii
ld a, ' '
call print_char
ld a, '|'
call print_char
;next row:
ld a,d ;if sector byte counter is not 0
or e
jp nz, _com_prg_loop_row ;next row
;else read next sector or exit
pop af ;if status from sector read
or a
jp z, _com_prg_loop ;sector available
;else exit
call print_newLine
ret
_com_prg_fail:
ld hl,[_fat_exec_notfound]
call print_str
ret
_com_prg_fail_str_header:
db 10,13,'OFFSET | 0 1 2 3 4 5 6 7 8 9 A B C D E F | ASCII',0
prg_end:
_eof:

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,24 @@
:10800000C340800000000000000000806D816D0111
:108010000000000000000000000000000000000060
:108020000000000000000000000000000000000050
:108030000000000000000000000000000000000040
:10804000217B410150003E20EDB10150003E20ED6A
:10805000B1E5E1EBCDDD21B7C22181AF320B413279
:108060000C41320D41320E4111B642CDB021F52105
:108070002881CDEA0021B642110002ED530F41CD17
:10808000FC003A0E41CD12013A0D41CD12013A0CDD
:1080900041CD12013A0B41CD12013E20CDE2003E0E
:1080A0007CCDE2003E20CDE2003A0B41C610320BFF
:1080B000413A0C41CE00320C413A0D41CE00320D16
:1080C000413A0E41CE00320E410610E57ECD12013E
:1080D0003E20CDE20023ED5B0F411BED530F41101D
:1080E000EBCDE2003E7CCDE2003E20CDE200E10699
:1080F000107E23FE20DA0281FE7FD20281CDE200D3
:1081000018053E2ECDE20010E83E20CDE2003E7C78
:10811000CDE2007AB3C27F80F1B7CA6880CDFC009F
:10812000C9211226CDEA00C90A0D4F4646534554CF
:108130002020207C2030202031202032202033209D
:1081400020342020352020362020372020382020C1
:108150003920204120204220204320204420204557
:0D81600020204620207C2041534349490047
:00000001FF

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,23 @@
!8000 C3 40 80 00 00 00 00 00 00 00 00 80 6D 81 6D 01
!8010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
!8020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
!8030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
!8040 21 7B 41 01 50 00 3E 20 ED B1 01 50 00 3E 20 ED
!8050 B1 E5 E1 EB CD DD 21 B7 C2 21 81 AF 32 0B 41 32
!8060 0C 41 32 0D 41 32 0E 41 11 B6 42 CD B0 21 F5 21
!8070 28 81 CD EA 00 21 B6 42 11 00 02 ED 53 0F 41 CD
!8080 FC 00 3A 0E 41 CD 12 01 3A 0D 41 CD 12 01 3A 0C
!8090 41 CD 12 01 3A 0B 41 CD 12 01 3E 20 CD E2 00 3E
!80A0 7C CD E2 00 3E 20 CD E2 00 3A 0B 41 C6 10 32 0B
!80B0 41 3A 0C 41 CE 00 32 0C 41 3A 0D 41 CE 00 32 0D
!80C0 41 3A 0E 41 CE 00 32 0E 41 06 10 E5 7E CD 12 01
!80D0 3E 20 CD E2 00 23 ED 5B 0F 41 1B ED 53 0F 41 10
!80E0 EB CD E2 00 3E 7C CD E2 00 3E 20 CD E2 00 E1 06
!80F0 10 7E 23 FE 20 DA 02 81 FE 7F D2 02 81 CD E2 00
!8100 18 05 3E 2E CD E2 00 10 E8 3E 20 CD E2 00 3E 7C
!8110 CD E2 00 7A B3 C2 7F 80 F1 B7 CA 68 80 CD FC 00
!8120 C9 21 12 26 CD EA 00 C9 0A 0D 4F 46 46 53 45 54
!8130 20 20 20 7C 20 30 20 20 31 20 20 32 20 20 33 20
!8140 20 34 20 20 35 20 20 36 20 20 37 20 20 38 20 20
!8150 39 20 20 41 20 20 42 20 20 43 20 20 44 20 20 45
!8160 20 20 46 20 20 7C 20 41 53 43 49 49 00