Skip to content

Commit 3ddccf1

Browse files
v0.9.9
1 parent 532c408 commit 3ddccf1

File tree

31 files changed

+383
-11
lines changed

31 files changed

+383
-11
lines changed

Distro/Linux64/Plataformas/8086/System.hcb

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,4 +407,39 @@ module UInt32
407407
asm "mov [si], ax\n"
408408
asm "mov [si+2], bx\n"
409409
end
410-
end
410+
end
411+
412+
Module IO
413+
Public Sub OutputByte(port as UInt16, value as UInt8)
414+
asm "mov dx, [bp+6]"
415+
asm "mov ax, [bp+8]"
416+
asm "out dx, al"
417+
End
418+
419+
Public Sub OutputWord(port as UInt16, value as UInt16)
420+
asm "mov dx, [bp+6]"
421+
asm "mov ax, [bp+8]"
422+
asm "out dx, ax"
423+
End
424+
425+
Public Function InputByte(port as UInt16) as UInt8
426+
asm "mov dx, [bp+6]"
427+
asm "xor ax, ax"
428+
asm "in al, dx"
429+
End
430+
431+
Public Function InputWord(port as UInt16) as UInt16
432+
asm "mov dx, [bp+6]"
433+
asm "in ax, dx"
434+
End
435+
436+
Public Sub RegisterHandler(interrupt as UInt8, handler as PtrByteArray)
437+
Dim ptr as PtrWordArray
438+
#ptr = 0
439+
@ptr = interrupt * 4
440+
ptr = @handler
441+
@ptr ++
442+
@ptr ++
443+
ptr = #handler
444+
End
445+
End

Distro/Linux64/hcbasic.dll

1.5 KB
Binary file not shown.

Distro/Linux64/hcbasic.pdb

412 Bytes
Binary file not shown.

Distro/LinuxARM32/Plataformas/8086/System.hcb

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,4 +407,39 @@ module UInt32
407407
asm "mov [si], ax\n"
408408
asm "mov [si+2], bx\n"
409409
end
410-
end
410+
end
411+
412+
Module IO
413+
Public Sub OutputByte(port as UInt16, value as UInt8)
414+
asm "mov dx, [bp+6]"
415+
asm "mov ax, [bp+8]"
416+
asm "out dx, al"
417+
End
418+
419+
Public Sub OutputWord(port as UInt16, value as UInt16)
420+
asm "mov dx, [bp+6]"
421+
asm "mov ax, [bp+8]"
422+
asm "out dx, ax"
423+
End
424+
425+
Public Function InputByte(port as UInt16) as UInt8
426+
asm "mov dx, [bp+6]"
427+
asm "xor ax, ax"
428+
asm "in al, dx"
429+
End
430+
431+
Public Function InputWord(port as UInt16) as UInt16
432+
asm "mov dx, [bp+6]"
433+
asm "in ax, dx"
434+
End
435+
436+
Public Sub RegisterHandler(interrupt as UInt8, handler as PtrByteArray)
437+
Dim ptr as PtrWordArray
438+
#ptr = 0
439+
@ptr = interrupt * 4
440+
ptr = @handler
441+
@ptr ++
442+
@ptr ++
443+
ptr = #handler
444+
End
445+
End

Distro/LinuxARM32/hcbasic.dll

1.5 KB
Binary file not shown.

Distro/LinuxARM32/hcbasic.pdb

412 Bytes
Binary file not shown.

Distro/LinuxARM64/Plataformas/8086/System.hcb

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,4 +407,39 @@ module UInt32
407407
asm "mov [si], ax\n"
408408
asm "mov [si+2], bx\n"
409409
end
410-
end
410+
end
411+
412+
Module IO
413+
Public Sub OutputByte(port as UInt16, value as UInt8)
414+
asm "mov dx, [bp+6]"
415+
asm "mov ax, [bp+8]"
416+
asm "out dx, al"
417+
End
418+
419+
Public Sub OutputWord(port as UInt16, value as UInt16)
420+
asm "mov dx, [bp+6]"
421+
asm "mov ax, [bp+8]"
422+
asm "out dx, ax"
423+
End
424+
425+
Public Function InputByte(port as UInt16) as UInt8
426+
asm "mov dx, [bp+6]"
427+
asm "xor ax, ax"
428+
asm "in al, dx"
429+
End
430+
431+
Public Function InputWord(port as UInt16) as UInt16
432+
asm "mov dx, [bp+6]"
433+
asm "in ax, dx"
434+
End
435+
436+
Public Sub RegisterHandler(interrupt as UInt8, handler as PtrByteArray)
437+
Dim ptr as PtrWordArray
438+
#ptr = 0
439+
@ptr = interrupt * 4
440+
ptr = @handler
441+
@ptr ++
442+
@ptr ++
443+
ptr = #handler
444+
End
445+
End

Distro/LinuxARM64/hcbasic.dll

1.5 KB
Binary file not shown.

Distro/LinuxARM64/hcbasic.pdb

412 Bytes
Binary file not shown.

Distro/LinuxMUSL64/Plataformas/8086/System.hcb

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,4 +407,39 @@ module UInt32
407407
asm "mov [si], ax\n"
408408
asm "mov [si+2], bx\n"
409409
end
410-
end
410+
end
411+
412+
Module IO
413+
Public Sub OutputByte(port as UInt16, value as UInt8)
414+
asm "mov dx, [bp+6]"
415+
asm "mov ax, [bp+8]"
416+
asm "out dx, al"
417+
End
418+
419+
Public Sub OutputWord(port as UInt16, value as UInt16)
420+
asm "mov dx, [bp+6]"
421+
asm "mov ax, [bp+8]"
422+
asm "out dx, ax"
423+
End
424+
425+
Public Function InputByte(port as UInt16) as UInt8
426+
asm "mov dx, [bp+6]"
427+
asm "xor ax, ax"
428+
asm "in al, dx"
429+
End
430+
431+
Public Function InputWord(port as UInt16) as UInt16
432+
asm "mov dx, [bp+6]"
433+
asm "in ax, dx"
434+
End
435+
436+
Public Sub RegisterHandler(interrupt as UInt8, handler as PtrByteArray)
437+
Dim ptr as PtrWordArray
438+
#ptr = 0
439+
@ptr = interrupt * 4
440+
ptr = @handler
441+
@ptr ++
442+
@ptr ++
443+
ptr = #handler
444+
End
445+
End

0 commit comments

Comments
 (0)