added txt.bell() to make terminal beep/bell sound on most systems

This commit is contained in:
Irmen de Jong 2024-02-21 17:35:37 +01:00
parent 8ff10724d1
commit d4b087ea3f
7 changed files with 55 additions and 24 deletions

View File

@ -14,15 +14,19 @@ const ubyte DEFAULT_HEIGHT = 24
sub clear_screen() {
txt.chrout(125)
chrout(125)
}
sub nl() {
txt.chrout('\n')
chrout('\n')
}
sub spc() {
txt.chrout(' ')
chrout(' ')
}
sub bell() {
chrout($fd)
}
sub column(ubyte col) {

View File

@ -15,19 +15,23 @@ const ubyte DEFAULT_HEIGHT = 25
sub clear_screen() {
txt.chrout(147)
chrout(147)
}
sub home() {
txt.chrout(19)
chrout(19)
}
sub nl() {
txt.chrout('\n')
chrout('\n')
}
sub spc() {
txt.chrout(' ')
chrout(' ')
}
sub bell() {
chrout(7)
}
asmsub column(ubyte col @A) clobbers(A, X, Y) {

View File

@ -15,19 +15,29 @@ const ubyte DEFAULT_HEIGHT = 25
sub clear_screen() {
txt.chrout(147)
chrout(147)
}
sub home() {
txt.chrout(19)
chrout(19)
}
sub nl() {
txt.chrout('\n')
chrout('\n')
}
sub spc() {
txt.chrout(' ')
chrout(' ')
}
sub bell() {
; beep
c64.MVOL = 11
c64.AD1 = %00110111
c64.SR1 = %00000000
c64.FREQ1 = 8500
c64.CR1 = %00010000
c64.CR1 = %00010001
}
asmsub column(ubyte col @A) clobbers(A, X, Y) {

View File

@ -18,19 +18,23 @@ const uword VERA_TEXTMATRIX_ADDR = $b000
sub clear_screen() {
txt.chrout(147)
chrout(147)
}
sub home() {
txt.chrout(19)
chrout(19)
}
sub nl() {
txt.chrout('\n')
chrout('\n')
}
sub spc() {
txt.chrout(' ')
chrout(' ')
}
sub bell() {
chrout(7)
}
asmsub column(ubyte col @A) clobbers(A, X, Y) {

View File

@ -14,21 +14,24 @@ const ubyte DEFAULT_HEIGHT = 25
sub clear_screen() {
txt.chrout(147)
chrout(147)
}
sub home() {
txt.chrout(19)
chrout(19)
}
sub nl() {
txt.chrout('\n')
chrout('\n')
}
sub spc() {
txt.chrout(' ')
chrout(' ')
}
sub bell() {
chrout(7)
}
asmsub get_column() -> ubyte @Y {

View File

@ -22,11 +22,11 @@ sub clear_screen() {
}
sub nl() {
txt.chrout('\n')
chrout('\n')
}
sub spc() {
txt.chrout(' ')
chrout(' ')
}
sub lowercase() {
@ -44,6 +44,10 @@ sub chrout(ubyte char) {
}}
}
sub bell() {
chrout(7)
}
sub print (str text) {
%ir {{
loadm.w r65535,txt.print.text

View File

@ -11,9 +11,11 @@ main {
if pointer>value {
cx16.r0L++
}
if pointer>50000 {
cx16.r0L++
}
; if pointer>50000 {
; cx16.r0L++
; }
txt.bell()
}
}