File tree 3 files changed +18
-3
lines changed
3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 1
- Additional BDOS calls for Arduino.
1
+ Additional BDOS calls for Arduino / Teensy.
2
+
3
+ HostOS is available for all platforms - see cpm.h
2
4
3
5
=====================================================
4
6
@@ -47,3 +49,12 @@ BDOS function 224 (0xE0) - AnalogWrite:
47
49
LD E, value (0-255)
48
50
CALL 5
49
51
52
+ =====================================================
53
+
54
+ BDOS function 250 (0xFA) - HostOS:
55
+
56
+ LD C, 250
57
+ CALL 5
58
+
59
+ Returns result in HL (1 = Arduino, 4 = Teensy).
60
+
Original file line number Diff line number Diff line change 5
5
#define printf (a , b ) Serial.println(b)
6
6
#endif
7
7
8
+ #ifdef CORE_TEENSY
9
+ #define HostOS 0x04
10
+ #else
8
11
#define HostOS 0x01
12
+ #endif
9
13
10
14
/* Memory abstraction functions */
11
15
/*===============================================================================*/
Original file line number Diff line number Diff line change @@ -696,7 +696,7 @@ void _Bdos(void) {
696
696
case 40 :
697
697
HL = _WriteRand (DE );
698
698
break ;
699
- #ifdef ARDUINO
699
+ #if defined ARDUINO || defined CORE_TEENSY
700
700
/*
701
701
C = 220 (DCh) : PinMode
702
702
*/
@@ -730,7 +730,7 @@ void _Bdos(void) {
730
730
#endif
731
731
/*
732
732
C = 250 (FAh) : HostOS
733
- Returns: A = 0x00 - Windows / 0x01 - Arduino / 0x02 - Posix / 0x03 - Dos
733
+ Returns: A = 0x00 - Windows / 0x01 - Arduino / 0x02 - Posix / 0x03 - Dos / 0x04 - Teensy
734
734
*/
735
735
case 250 :
736
736
HL = HostOS ;
You can’t perform that action at this time.
0 commit comments