From 331da168b4a33215c58efafebf4dfe906afd7c89 Mon Sep 17 00:00:00 2001 From: Tibo Date: Thu, 7 Oct 2021 18:18:29 +0200 Subject: [PATCH] make indentation a bit more consistent --- messages.asm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/messages.asm b/messages.asm index 35b8670..529b262 100644 --- a/messages.asm +++ b/messages.asm @@ -6,7 +6,7 @@ HEIGHT equ 0x18 ; 24 VIDEO_MODE equ 0x3 ; 80x25 screen, text mode PIT_MODECOMMAND_PORT equ 0x43 ; programmable interval timer mode/command port (used for speaker) -PIT_CH2_DATA_PORT equ 0x42 ; PIT channel 2 data port +PIT_CH2_DATA_PORT equ 0x42 ; PIT channel 2 data port ;; see http://www.ctyme.com/intr/int-10.htm for interrupts @@ -36,9 +36,9 @@ mov sp, 0x2000 ; initialise stack pointer ;; 1 1 8 ;; initialise serial port -mov ah, 0x0 ; initialise UART +mov ah, 0x0 ; initialise UART mov al, 0b111_00_0_11 ; baud 9600, no parity, 1 stop bit, 8 data bits -mov dx, 0x0 ; COM1 +mov dx, 0x0 ; COM1 int 0x14 ;; Use color mode @@ -159,7 +159,7 @@ newline: beep: call read_duration ; get duration from keyboard (in al) mov ah, 0 - push ax ; store on stack + push ax ; store on stack ;; move 182 (0b10 11 011 0) into al ;; bit 7-6 = channel select (2, PC speaker) @@ -185,7 +185,7 @@ beep: or al, 00000011b ; Set bits 1 and 0 (enable speaker, input = channel 2) out 0x61, al ; Send new value - ;; mov bx, 50000 ; Pause for duration of note. + ;; mov bx, 50000 ; Pause for duration of note. ;; multiply duration by 3125 pop bx ; pull duration value from stack into bx @@ -200,10 +200,10 @@ beep: mov ecx, 65535 .pause2: dec cx ; count down - jne .pause2 ; if not zero keep counting down + jne .pause2 ; if not zero keep counting down dec bx ; decrement duration counter - jne .pause1 ; keep doing that until it is 0 + jne .pause1 ; keep doing that until it is 0 in al, 0x61 ; Preserve previous value and al, 11111100b ; Clear bits 1 and 0 (disable speaker, clear channel select) @@ -220,10 +220,10 @@ beep: ;; - dx nonewline: ;; Write character - mov ah, 0x09 ; write character with attribute - mov bh, 0x00 ; page number + mov ah, 0x09 ; write character with attribute + mov bh, 0x00 ; page number mov bl, [color_mode] ; BIOS colour code - mov cx, 0x01 ; amount of times to print character + mov cx, 0x01 ; amount of times to print character int 0x10 ;; Get current cursor position