chore: sync repo

This commit is contained in:
d0p1 🏳️‍⚧️ 2024-07-15 15:58:43 +02:00
parent 6027655f3c
commit 6cf0c63cf4
2 changed files with 70 additions and 4 deletions

View file

@ -19,8 +19,6 @@ cga_getpos:
; read cursor position ; read cursor position
xor ax, ax xor ax, ax
xchg bx, bx
; get high ; get high
mov dx, CGA_COMMAND mov dx, CGA_COMMAND
mov al, CGA_CURSOR_HIGH mov al, CGA_CURSOR_HIGH
@ -43,7 +41,6 @@ cga_getpos:
;; In: ;; In:
;; AX - cursor position ;; AX - cursor position
cga_setpos: cga_setpos:
xchg bx, bx
mov dx, CGA_COMMAND mov dx, CGA_COMMAND
push ax push ax
mov al, CGA_CURSOR_HIGH mov al, CGA_CURSOR_HIGH

View file

@ -1,11 +1,80 @@
;; File: ne2k.inc ;; File: ne2k.inc
;; ;;
;; Usefull links: ;; Usefull links:
;; - <datasheet at https://bitsavers.org/components/national/_dataBooks/1988_National_Data_Communications_Local_Area_Networks_UARTs_Handbook.pdf> ;; - <datasheet at https://web.archive.org/web/20010612150713/http://www.national.com/ds/DP/DP8390D.pdf>
NE2K_IOBASE = 0x300 NE2K_IOBASE = 0x300
; PAGE 0
NE2K_CR = NE2K_IOBASE + 0x0
NE2K_CR_PS1 = 0x80
NE2K_CR_PS0 = 0x40
NE2K_CR_RD2 = 0x20
NE2K_CR_RD1 = 0x10
NE2K_CR_RD0 = 0x08
NE2K_CR_TXP = 0x04
NE2K_CR_STA = 0x02
NE2K_CR_STP = 0x01
NE2K_CLDA0 = NE2K_IOBASE + 0x1
NE2K_CLDA1 = NE2K_IOBASE + 0x2
NE2K_BNRY = NE2K_IOBASE + 0x3
NE2K_TSR = NE2K_IOBASE + 0x4
NE2K_NCR = NE2K_IOBASE + 0x5
NE2K_FIFO = NE2K_IOBASE + 0x6
NE2K_ISR = NE2K_IOBASE + 0x7
NE2K_CRDA0 = NE2K_IOBASE + 0x8
NE2K_CRDA1 = NE2K_IOBASE + 0x9
NE2K_RSR = NE2K_IOBASE + 0xC
NE2K_CNTR0 = NE2K_IOBASE + 0xD
NE2K_CNTR1 = NE2K_IOBASE + 0xE
NE2K_CNTR2 = NE2K_IOBASE + 0xF
NE2K_PSTART = NE2K_IOBASE + 0x1
NE2K_PSTOP = NE2K_IOBASE + 0x2
NE2K_TPSR = NE2K_IOBASE + 0x4
NE2K_TBCR0 = NE2K_IOBASE + 0x5
NE2K_TBCR1 = NE2K_IOBASE + 0x6
NE2K_RSAR0 = NE2K_IOBASE + 0x8
NE2K_RSAR1 = NE2K_IOBASE + 0x9
NE2K_RBCR0 = NE2K_IOBASE + 0xA
NE2K_RBCR1 = NE2K_IOBASE + 0xB
NE2K_RCR = NE2K_IOBASE + 0xC
NE2K_TCR = NE2K_IOBASE + 0xD
NE2K_DCR = NE2K_IOBASE + 0xE
NE2K_IMR = NE2K_IOBASE + 0xF
; PAGE 1
NE2K_PAR0 = NE2K_IOBASE + 0x1
NE2K_PAR1 = NE2K_IOBASE + 0x2
NE2K_PAR2 = NE2K_IOBASE + 0x3
NE2K_PAR3 = NE2K_IOBASE + 0x4
NE2K_PAR4 = NE2K_IOBASE + 0x5
NE2K_PAR5 = NE2K_IOBASE + 0x6
NE2K_CURR = NE2K_IOBASE + 0x7
NE2K_MAR0 = NE2K_IOBASE + 0x8
NE2K_MAR1 = NE2K_IOBASE + 0x9
NE2K_MAR2 = NE2K_IOBASE + 0xA
NE2K_MAR3 = NE2K_IOBASE + 0xB
NE2K_MAR4 = NE2K_IOBASE + 0xC
NE2K_MAR5 = NE2K_IOBASE + 0xD
NE2K_MAR6 = NE2K_IOBASE + 0xE
NE2K_MAR7 = NE2K_IOBASE + 0xF
ne2k_init:
mov dx, NE2K_IOBASE
in al, dx
out dx, al
mov al, NE2K_CR_STP
out dx, al
ret
ne2k_probe: ne2k_probe:
ret ret
ne2k_irq: ne2k_irq: