This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint16_t sjis2jis( uint16_t charcode ) | |
{ | |
// シフトJISコードをJISコードに変換する | |
// charcode = シフトJISコード | |
// 戻り値:JISコード | |
uint8_t h, l; | |
h = charcode >> 8; | |
l = charcode & 0xff; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@REM このファイルはパスの通ったフォルダにコピーして下さい | |
sdcc %1.c -mmcs51 | |
rem (for CH552) sdcc %1.c -mmcs51 --iram-size 256 --xram-size 1024 --code-size 14336 | |
rem (for CH551) sdcc %1.c -mmcs51 --iram-size 256 --xram-size 512 --code-size 8192 | |
packihx %1.ihx > %1.hex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "sdcc", | |
"type": "shell", | |
"command": "_sdcc", | |
"args": [ | |
"main" | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"configurations": [ | |
{ | |
"name": "Win32", | |
"includePath": [ | |
"${workspaceFolder}/**", | |
"C:/Program Files/SDCC/include/**" | |
], | |
"defines": [ | |
"_DEBUG", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* CH552G test program */ | |
#include <8052.h> | |
#include <stdint.h> | |
void delay( void ); | |
void main( void ) { | |
while( 1 ) { | |
P1_1 = 0; |